summaryrefslogtreecommitdiff
path: root/setup.cfg
diff options
context:
space:
mode:
authorMitja HORVAT <pinkfluid@gmail.com>2018-08-29 22:53:49 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-09-07 21:11:43 +0200
commitac8d152ec81a82ebacb0e77c3aa6f0cd81638f80 (patch)
tree42fd71790af2184eb0829a1894ab390f6983ef25 /setup.cfg
parent2be02fac785272e3bcea2cef619954535dc9abe0 (diff)
menuconfig: Add support for custom color schemes (aka styles)
- introduce the _parse_styles() function which can take a string defintion and parse it into a color structure that can be used by UI elements - the _parse_styles() function modifies a global dictionary (_style) which is subsequentially used to style the UI elements - the _style_to_curses() function takes a string representation of style colors and converts it to ncurses attributes. For eaxmple: fg:brightred,bg:black,bold -> returns a color pair representing brightred and black ORed with A_BOLD - simplify _init_styles() as now the majority of the heavy lifting is done by _parse_styles(). _init_styles() initializes the default theme (either "defualt" or "monochrome") - terminals without color capabilities are now handled by using the "monochrome" theme. This theme doesn't use any colors but rather just bold and standout attribtes. - add support for the "underline" attribute - add doctstring at the beginning describing the style syntax - rename the _style() function to _style_attr() as it was conflicting with the global _style dictionary - introduce the StyleError exception; this one is thrown if an error in the style syntax is encountered
Diffstat (limited to 'setup.cfg')
0 files changed, 0 insertions, 0 deletions