From 1793fa43cfbbeda03083c2748fc863394e0e47e6 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 23 Mar 2024 15:10:55 +0800 Subject: [PATCH] Fix for screen readers --- lib-tui/GHCup/Brick/Widgets/Navigation.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib-tui/GHCup/Brick/Widgets/Navigation.hs b/lib-tui/GHCup/Brick/Widgets/Navigation.hs index 77de48e..0685bf4 100644 --- a/lib-tui/GHCup/Brick/Widgets/Navigation.hs +++ b/lib-tui/GHCup/Brick/Widgets/Navigation.hs @@ -36,6 +36,8 @@ import Brick (<+>), (<=>)) import qualified Brick +import Brick.Widgets.Core ( putCursor ) +import Brick.Types ( Location(..) ) import Brick.Widgets.Border ( hBorder, borderWithLabel) import Brick.Widgets.Border.Style ( unicode ) import Brick.Widgets.Center ( center ) @@ -100,7 +102,8 @@ draw dimAttrs section_list | elem Latest lTag' && not lInstalled = Brick.withAttr Attributes.hoorayAttr | otherwise = id - in hooray $ dim + active = if b then putCursor Common.AllTools (Location (0,0)) else id + in hooray $ active $ dim ( marks <+> Brick.padLeft (Pad 2) ( minHSize 6 @@ -145,4 +148,4 @@ draw dimAttrs section_list Nothing -> mempty Just d -> [Brick.withAttr Attributes.dayAttr $ Brick.str (show d)]) - minHSize s' = Brick.hLimit s' . Brick.vLimit 1 . (<+> Brick.fill ' ') \ No newline at end of file + minHSize s' = Brick.hLimit s' . Brick.vLimit 1 . (<+> Brick.fill ' ')