From 5ea2d77921d2303e7fa66173c05fbb231f07e5a7 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Tue, 30 May 2023 17:58:45 -0400 Subject: [PATCH] bugfix: make the whole background blue --- src/Mtlstats.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Mtlstats.hs b/src/Mtlstats.hs index b6e6b02..339d2e9 100644 --- a/src/Mtlstats.hs +++ b/src/Mtlstats.hs @@ -23,7 +23,9 @@ module Mtlstats (app) where import Brick.AttrMap (AttrMap, forceAttrMap) import Brick.Main (App (..), showFirstCursor) +import Brick.Types (Widget) import Brick.Util (on) +import Brick.Widgets.Core (fill) import Graphics.Vty.Attributes.Color (blue, white) import Lens.Micro (to) import Lens.Micro.Mtl (use) @@ -34,13 +36,19 @@ import Mtlstats.Types -- | The main application app :: App ProgState () () app = App - { appDraw = \s -> [drawController (dispatch s) s] + { appDraw = draw , appChooseCursor = showFirstCursor , appHandleEvent = handler , appStartEvent = return () , appAttrMap = const myAttrMap } +draw :: ProgState -> [Widget ()] +draw s = + [ drawController (dispatch s) s + , fill ' ' + ] + handler :: Handler () handler e = do c <- use (to dispatch)