ui: fix AttrMap/styles explanation per JD
This commit is contained in:
parent
5822380719
commit
d32a028a19
@ -40,11 +40,19 @@ getTheme name = M.lookup name themes
|
|||||||
--
|
--
|
||||||
-- A hledger-ui theme is a vty/brick AttrMap. Each theme specifies a
|
-- A hledger-ui theme is a vty/brick AttrMap. Each theme specifies a
|
||||||
-- default style (Attr), plus extra styles which are applied when
|
-- default style (Attr), plus extra styles which are applied when
|
||||||
-- their (hierarchical) name matches the widget rendering context. Eg
|
-- their (hierarchical) name matches the widget rendering context.
|
||||||
-- when rendering a widget named "b" which is inside a widget named
|
-- "More specific styles, if present, are used and only fall back to
|
||||||
-- "a", the following styles will be applied if they exist: the
|
-- more general ones when the more specific ones are absent, but also
|
||||||
-- default style, then a style named "a", and finally a style named
|
-- these styles get merged, so that if a more specific style only
|
||||||
-- "a" <> "b".
|
-- provides the foreground color, its more general parent style can
|
||||||
|
-- set the background color, too."
|
||||||
|
-- For example: rendering a widget named "b" inside a widget named "a",
|
||||||
|
-- - if a style named "a" <> "b" exists, it will be used. Anything it
|
||||||
|
-- does not specify will be taken from a style named "a" if that
|
||||||
|
-- exists, otherwise from the default style.
|
||||||
|
-- - otherwise if a style named "a" exists, it will be used, and
|
||||||
|
-- anything it does not specify will be taken from the default style.
|
||||||
|
-- - otherwise (you guessed it) the default style is used.
|
||||||
--
|
--
|
||||||
themes :: M.Map String AttrMap
|
themes :: M.Map String AttrMap
|
||||||
themes = M.fromList themesList
|
themes = M.fromList themesList
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user