tuikit/core/theme.py
author Radek Brich <radek.brich@devl.cz>
Wed, 03 Sep 2014 19:08:21 +0200
changeset 109 105b1affc3c2
parent 89 94f5baef19ac
child 119 dd91747504dd
permissions -rw-r--r--
Update keypress propagation. Allow focus change by tab key. Add log property to Widget for smart logging.

from tuikit.core.unigraph import unigraph_default as unigraph


class ColorTheme:

    """Default color style"""

    normal = 'lightgray'
    active = 'black on cyan'
    button = 'black on lightgray'
    button_active = 'black on cyan'


class GraphicalTheme:

    """Default graphical symbols"""

    # Frame
    frame_hline = unigraph.HLINE
    frame_vline = unigraph.VLINE
    frame_ulcorner = unigraph.ULCORNER
    frame_urcorner = unigraph.URCORNER
    frame_llcorner = unigraph.LLCORNER
    frame_lrcorner = unigraph.LRCORNER
    frame_ltee = unigraph.LTEE
    frame_rtee = unigraph.RTEE

    # Scrollbar
    sb_thumb = unigraph.CIRCLE
    sb_htrack = unigraph.DOTTED_HLINE
    sb_vtrack = unigraph.DOTTED_VLINE
    sb_left = unigraph.LEFT_ARROW
    sb_right = unigraph.RIGHT_ARROW
    sb_up = unigraph.UP_ARROW
    sb_down = unigraph.DOWN_ARROW


class Theme(ColorTheme, GraphicalTheme):

    def __getitem__(self, name):
        return getattr(self, name)


default_theme = Theme()