tuikit/core/theme.py
author Radek Brich <radek.brich@devl.cz>
Sun, 22 Feb 2015 09:53:13 +0100
changeset 119 dd91747504dd
parent 109 105b1affc3c2
permissions -rw-r--r--
Redraw widgets on request. Add scrollbar demo.

from tuikit.core.unigraph import unigraph_default as unigraph


class ColorTheme:

    """Default color style"""

    clr_normal = 'lightgray'
    clr_active = 'black on cyan'
    clr_button = 'black on lightgray'
    clr_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()