From 4fc78139186f1f1fc8944bf090b1c23f4f398620 Mon Sep 17 00:00:00 2001 From: Jonathan Daugherty Date: Sat, 9 May 2015 01:05:34 -0700 Subject: [PATCH] Misc updates --- programs/Main.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/programs/Main.hs b/programs/Main.hs index f2e9cd4..6e69ffc 100644 --- a/programs/Main.hs +++ b/programs/Main.hs @@ -14,12 +14,11 @@ data St = drawUI :: St -> Widget drawUI st = - hBox [ hLimit 25 $ vBox [ "-- header --" - , (txt (msg st)) `withNamedCursor` (Name "bar", Location (length $ msg st, 0)) - ] `withAttr` (fg red) - , vBorder '|' - , "stuff things" `withNamedCursor` (Name "foo", Location (0, 0)) - ] + let editor = txt (msg st) `withNamedCursor` (Name "edit", Location (length $ msg st, 0)) + in vBox [ editor `withAttr` (cyan `on` blue) + , hBorder '-' + , "stuff and things" + ] handleEvent :: Event -> St -> Either ExitCode St handleEvent e st = @@ -36,7 +35,7 @@ pickCursor st ls = initialState :: St initialState = St { msg = "" - , focus = focusRing [Name "foo", Name "bar"] + , focus = focusRing [Name "edit"] } main :: IO ()