bugfix: make the whole background blue
This commit is contained in:
parent
227401461b
commit
5ea2d77921
|
@ -23,7 +23,9 @@ module Mtlstats (app) where
|
||||||
|
|
||||||
import Brick.AttrMap (AttrMap, forceAttrMap)
|
import Brick.AttrMap (AttrMap, forceAttrMap)
|
||||||
import Brick.Main (App (..), showFirstCursor)
|
import Brick.Main (App (..), showFirstCursor)
|
||||||
|
import Brick.Types (Widget)
|
||||||
import Brick.Util (on)
|
import Brick.Util (on)
|
||||||
|
import Brick.Widgets.Core (fill)
|
||||||
import Graphics.Vty.Attributes.Color (blue, white)
|
import Graphics.Vty.Attributes.Color (blue, white)
|
||||||
import Lens.Micro (to)
|
import Lens.Micro (to)
|
||||||
import Lens.Micro.Mtl (use)
|
import Lens.Micro.Mtl (use)
|
||||||
|
@ -34,13 +36,19 @@ import Mtlstats.Types
|
||||||
-- | The main application
|
-- | The main application
|
||||||
app :: App ProgState () ()
|
app :: App ProgState () ()
|
||||||
app = App
|
app = App
|
||||||
{ appDraw = \s -> [drawController (dispatch s) s]
|
{ appDraw = draw
|
||||||
, appChooseCursor = showFirstCursor
|
, appChooseCursor = showFirstCursor
|
||||||
, appHandleEvent = handler
|
, appHandleEvent = handler
|
||||||
, appStartEvent = return ()
|
, appStartEvent = return ()
|
||||||
, appAttrMap = const myAttrMap
|
, appAttrMap = const myAttrMap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw :: ProgState -> [Widget ()]
|
||||||
|
draw s =
|
||||||
|
[ drawController (dispatch s) s
|
||||||
|
, fill ' '
|
||||||
|
]
|
||||||
|
|
||||||
handler :: Handler ()
|
handler :: Handler ()
|
||||||
handler e = do
|
handler e = do
|
||||||
c <- use (to dispatch)
|
c <- use (to dispatch)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user