ui: make keys bold in bottom help
This commit is contained in:
		
							parent
							
								
									ebc4022888
								
							
						
					
					
						commit
						25a0a7c4dd
					
				| @ -119,10 +119,10 @@ drawAccountsScreen _st@AppState{aopts=uopts, ajournal=j, aScreen=AccountsScreen{ | |||||||
|       total = str $ show $ V.length $ l^.listElementsL |       total = str $ show $ V.length $ l^.listElementsL | ||||||
| 
 | 
 | ||||||
|       bottomlabel = borderKeysStr [ |       bottomlabel = borderKeysStr [ | ||||||
|          -- "up/down/pgup/pgdown/home/end: move" |          -- ("up/down/pgup/pgdown/home/end", "move") | ||||||
|          "-+1234567890: adjust depth limit" |          ("-+1234567890", "adjust depth limit") | ||||||
|         ,"right: show transactions" |         ,("right", "show transactions") | ||||||
|         ,"q: quit" |         ,("q", "quit") | ||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|       ui = Widget Greedy Greedy $ do |       ui = Widget Greedy Greedy $ do | ||||||
|  | |||||||
| @ -151,8 +151,8 @@ drawRegisterScreen AppState{ -- aopts=_uopts@UIOpts{cliopts_=_copts@CliOpts{repo | |||||||
|         colwidths = (datewidth,descwidth,acctswidth,changewidth,balwidth) |         colwidths = (datewidth,descwidth,acctswidth,changewidth,balwidth) | ||||||
| 
 | 
 | ||||||
|         bottomlabel = borderKeysStr [ |         bottomlabel = borderKeysStr [ | ||||||
|            -- "up/down/pgup/pgdown/home/end: move" |            -- ("up/down/pgup/pgdown/home/end", "move") | ||||||
|            "left: return to accounts" |            ("left", "return to accounts") | ||||||
|           ] |           ] | ||||||
| 
 | 
 | ||||||
|       render $ defaultLayout toplabel bottomlabel $ renderList l (drawRegisterItem colwidths) |       render $ defaultLayout toplabel bottomlabel $ renderList l (drawRegisterItem colwidths) | ||||||
|  | |||||||
| @ -70,6 +70,7 @@ themesList = [ | |||||||
|               (borderAttr <> "bold", white `on` black & bold), |               (borderAttr <> "bold", white `on` black & bold), | ||||||
|               (borderAttr <> "query", yellow `on` black & bold), |               (borderAttr <> "query", yellow `on` black & bold), | ||||||
|               (borderAttr <> "depth", cyan `on` black & bold), |               (borderAttr <> "depth", cyan `on` black & bold), | ||||||
|  |               (borderAttr <> "keys", white `on` black & bold), | ||||||
|               -- ("normal"                , black `on` white), |               -- ("normal"                , black `on` white), | ||||||
|               ("list"                  , black `on` white),      -- regular list items |               ("list"                  , black `on` white),      -- regular list items | ||||||
|               ("list" <> "selected"    , white `on` blue & bold), -- selected list items |               ("list" <> "selected"    , white `on` blue & bold), -- selected list items | ||||||
|  | |||||||
| @ -149,8 +149,11 @@ borderDepthStr :: Maybe Int -> Widget | |||||||
| borderDepthStr Nothing  = str "" | borderDepthStr Nothing  = str "" | ||||||
| borderDepthStr (Just d) = str " to " <+> withAttr (borderAttr <> "depth") (str $ "depth "++show d) | borderDepthStr (Just d) = str " to " <+> withAttr (borderAttr <> "depth") (str $ "depth "++show d) | ||||||
| 
 | 
 | ||||||
| borderKeysStr :: [String] -> Widget | borderKeysStr :: [(String,String)] -> Widget | ||||||
| borderKeysStr keydescs = str $ intercalate sep keydescs | borderKeysStr keydescs = | ||||||
|  |   hBox $ | ||||||
|  |   intersperse sep $ | ||||||
|  |   [withAttr (borderAttr <> "keys") (str keys) <+> str ": " <+> str desc | (keys, desc) <- keydescs] | ||||||
|   where |   where | ||||||
|     sep = " | " |     sep = str " | " | ||||||
|     -- sep = "  " |     -- sep = "  " | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user