properly centre menu headings

This commit is contained in:
2023-05-30 18:56:44 -04:00
parent 166483dc50
commit 097d51f34b
2 changed files with 14 additions and 9 deletions
+1 -2
View File
@@ -36,7 +36,6 @@ module Mtlstats.Menu (
import Brick.Main (halt)
import Brick.Types (BrickEvent (VtyEvent), Widget)
import Brick.Widgets.Center (hCenter)
import Control.Monad.State.Class (gets, modify)
import Data.Char (toUpper)
import qualified Data.Map as M
@@ -86,7 +85,7 @@ menuStateController menuFunc = Controller
drawMenu :: Menu a -> Widget ()
drawMenu m = let
menuLines = lines $ show m
in hCenter $ linesToWidget menuLines
in linesToWidgetC menuLines
-- | The event handler for a 'Menu'
menuHandler :: Menu a -> Handler a