various layout fixes
This commit is contained in:
parent
d92722be9c
commit
284a8c6725
|
@ -24,7 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
module Mtlstats.Control.EditStandings (editStandingsC) where
|
||||
|
||||
import Brick.Types (Widget)
|
||||
import Brick.Widgets.Core (str, vBox)
|
||||
import Brick.Widgets.Core (vBox)
|
||||
import Lens.Micro ((^.))
|
||||
|
||||
import Mtlstats.Format
|
||||
|
@ -34,6 +34,7 @@ import Mtlstats.Prompt
|
|||
import Mtlstats.Prompt.EditStandings
|
||||
import Mtlstats.Types
|
||||
import Mtlstats.Types.Menu
|
||||
import Mtlstats.Util
|
||||
|
||||
-- | Controller for the edit standings menu
|
||||
editStandingsC :: EditStandingsMode -> Controller
|
||||
|
@ -75,7 +76,10 @@ header s w = let
|
|||
[ ( "HOME", valsFor home )
|
||||
, ( "ROAD", valsFor away )
|
||||
]
|
||||
in vBox $ map str (table ++ [""]) ++ [w]
|
||||
in vBox
|
||||
[ linesToWidget $ table ++ [""]
|
||||
, w
|
||||
]
|
||||
|
||||
valsFor :: GameStats -> [Int]
|
||||
valsFor gs =
|
||||
|
|
|
@ -103,7 +103,7 @@ verifyDataC :: Controller
|
|||
verifyDataC = Controller
|
||||
{ drawController = \s -> let
|
||||
gs = s^.progMode.gameStateL
|
||||
in header s $ vBox $ map str $
|
||||
in header s $ linesToWidget $
|
||||
[""] ++
|
||||
labelTable
|
||||
[ ( "Date", gameDate gs )
|
||||
|
@ -172,7 +172,7 @@ confirmGoalDataC = Controller
|
|||
[ ""
|
||||
, "Is the above information correct? (Y/N)"
|
||||
]
|
||||
in vBox $ map str msg
|
||||
in linesToWidget msg
|
||||
, handleController = \e -> do
|
||||
case ynHandler e of
|
||||
Just True -> modify recordGoalAssists
|
||||
|
@ -201,7 +201,7 @@ getPMinsC = Controller
|
|||
|
||||
reportC :: Controller
|
||||
reportC = Controller
|
||||
{ drawController = viewport () Vertical . hCenter . vBox . map str .
|
||||
{ drawController = viewport () Vertical . hCenter . linesToWidget .
|
||||
displayReport reportCols
|
||||
, handleController = \e -> do
|
||||
scr <- use scroller
|
||||
|
@ -239,8 +239,11 @@ monthHeader s w = let
|
|||
, "NOVEMBER"
|
||||
, "DECEMBER"
|
||||
]
|
||||
in header s $ vBox $ map (hCenter . str)
|
||||
(["MONTH:", ""] ++ table ++ [""]) ++ [w]
|
||||
in header s $ vBox
|
||||
[ linesToWidgetC $
|
||||
["MONTH:", ""] ++ table ++ [""]
|
||||
, w
|
||||
]
|
||||
|
||||
gameGoal :: ProgState -> (Int, Int)
|
||||
gameGoal s =
|
||||
|
|
Loading…
Reference in New Issue
Block a user