diff --git a/src/pyj/book_list/theme.pyj b/src/pyj/book_list/theme.pyj index 8a3c6e985f..8a4437234e 100644 --- a/src/pyj/book_list/theme.pyj +++ b/src/pyj/book_list/theme.pyj @@ -7,42 +7,54 @@ LIGHT = '#F6F3E9' LIGHT_DARKER = '#b6b3a8' LIGHT_GRADIENT = 'linear-gradient(to bottom, {}, {})'.format(LIGHT, LIGHT_DARKER) +DEFAULT_COLORS = { + # General colors + 'window-background': LIGHT, + 'window-background2': LIGHT_DARKER, + 'window-foreground': DARK, + 'window-error-foreground': 'red', + 'window-hover-foreground': 'red', + + # Top bar specific colors + 'bar-background': DARK, + 'bar-foreground': LIGHT, + 'bar-highlight': 'yellow', + 'heart': '#B92111', + + # Item list colors + 'list-hover-background': DARK, + 'list-hover-foreground': LIGHT, + + # Tree colors + 'tree-highlight-item': LIGHT_DARKER, + + # Button colors + 'button-start': DARK, + 'button-end': '#49423B', + 'button-text': LIGHT, + + # Dialog colors + 'dialog-background': LIGHT, + 'dialog-background-image': LIGHT_GRADIENT, + 'dialog-foreground': DARK, +} + +DEFAULT_SIZES = { + 'title': '1.4rem', + 'item-list-title': '1.1rem', + 'item-list-subtitle': '0.8rem', +} + +DEFAULT_FONTS = { + 'main': 'sans-serif' +} + def get_color(name): - return { - # General colors - 'window-background': LIGHT, - 'window-background2': LIGHT_DARKER, - 'window-foreground': DARK, - 'window-error-foreground': 'red', - 'window-hover-foreground': 'red', - - # Top bar specific colors - 'bar-background': DARK, - 'bar-foreground': LIGHT, - 'bar-highlight': 'yellow', - 'heart': '#B92111', - - # Item list colors - 'list-hover-background': DARK, - 'list-hover-foreground': LIGHT, - - # Tree colors - 'tree-highlight-item': LIGHT_DARKER, - - # Button colors - 'button-start': DARK, - 'button-end': '#49423B', - 'button-text': LIGHT, - - # Dialog colors - 'dialog-background': LIGHT, - 'dialog-background-image': LIGHT_GRADIENT, - 'dialog-foreground': DARK, - }[name] + return DEFAULT_COLORS[name] def get_font_size(name): - return { - 'title': '1.4rem', - 'item-list-title': '1.1rem', - 'item-list-subtitle': '0.8rem', - }[name] + return DEFAULT_SIZES[name] + +def get_font_family(name): + name = name or 'main' + return DEFAULT_FONTS[name]