From 97d568ddd615da6874af22b7e8774fabd324f011 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 11 Oct 2020 21:44:11 +0200 Subject: [PATCH] Show new versions in bright white --- app/ghcup/BrickMain.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 2bc3992..cf45ae5 100644 --- a/app/ghcup/BrickMain.hs +++ b/app/ghcup/BrickMain.hs @@ -144,8 +144,12 @@ ui AppState { appData = AppData {..}, appSettings = as@(AppSettings {..}), ..} dim = if lNoBindist then updateAttrMap (const dimAttributes) . withAttr "no-bindist" else id + hooray + | elem Latest lTag && not lInstalled = + withAttr "hooray" + | otherwise = id active = if b then forceAttr "active" else id - in active $ dim + in hooray $ active $ dim ( marks <+> (( padLeft (Pad 2) $ minHSize 6 @@ -288,6 +292,7 @@ defaultAttributes = attrMap , ("compiled" , Vty.defAttr `Vty.withForeColor` Vty.blue) , ("stray" , Vty.defAttr `Vty.withForeColor` Vty.blue) , ("help" , Vty.defAttr `Vty.withStyle` Vty.italic) + , ("hooray" , Vty.defAttr `Vty.withForeColor` Vty.brightWhite) ] @@ -298,8 +303,6 @@ dimAttributes = attrMap , ("no-bindist", Vty.defAttr `Vty.withStyle` Vty.dim) ] - - eventHandler :: AppState -> BrickEvent n e -> EventM n (Next AppState) eventHandler st (VtyEvent (Vty.EvResize _ _)) = continue st eventHandler st (VtyEvent (Vty.EvKey (Vty.KChar 'q') _)) = halt st