예제 #1
0
    def load(self, style):
        mid = style.mid
        dark = style.dark
        light = style.light
        text = style.text
        active = rgb.mix_color(mid[Gtk.StateFlags.NORMAL],
                               light[Gtk.StateFlags.SELECTED], 0.3)

        self.bg_colors = {
            Gtk.StateFlags.NORMAL: (f(rgb.shade(mid[Gtk.StateFlags.NORMAL], 1.3)),
                                f(mid[Gtk.StateFlags.NORMAL])),

            Gtk.StateFlags.ACTIVE: (f(rgb.shade(active, 1.3)),
                               f(active)),

            Gtk.StateFlags.SELECTED: (f(rgb.shade(mid[Gtk.StateFlags.NORMAL], 0.95)),
                                 f(rgb.shade(mid[Gtk.StateFlags.NORMAL], 0.95))),

            self.PRELIT_NORMAL: (f(rgb.shade(mid[Gtk.StateFlags.NORMAL], 1.35)),
                                 f(rgb.shade(mid[Gtk.StateFlags.NORMAL], 1.15))),

            self.PRELIT_ACTIVE: (f(rgb.shade(active, 1.35)),
                                 f(rgb.shade(active, 1.15)))
            }

        self.dark_line_colors = {
            Gtk.StateFlags.NORMAL: f(dark[Gtk.StateFlags.ACTIVE]),
            Gtk.StateFlags.ACTIVE: f(dark[Gtk.StateFlags.ACTIVE]),
            Gtk.StateFlags.SELECTED: f(rgb.shade(dark[Gtk.StateFlags.ACTIVE], 0.95)),
            Gtk.StateFlags.PRELIGHT: f(dark[Gtk.StateFlags.PRELIGHT])
            }

        self.light_line_colors = {
            Gtk.StateFlags.NORMAL: f(light[Gtk.StateFlags.NORMAL]),
            Gtk.StateFlags.ACTIVE: f(light[Gtk.StateFlags.NORMAL]),
            Gtk.StateFlags.SELECTED: None,
            Gtk.StateFlags.PRELIGHT: f(light[Gtk.StateFlags.PRELIGHT])
            }

        self.text_state = {
            Gtk.StateFlags.NORMAL: Gtk.StateFlags.NORMAL,
            Gtk.StateFlags.ACTIVE: Gtk.StateFlags.ACTIVE,
            Gtk.StateFlags.SELECTED: Gtk.StateFlags.NORMAL,
            Gtk.StateFlags.PRELIGHT: Gtk.StateFlags.PRELIGHT
            }

        self.base_hack = None
        return
예제 #2
0
    def load(self, style):
        mid = style.mid
        dark = style.dark
        light = style.light
        text = style.text
        active = rgb.mix_color(mid[gtk.STATE_NORMAL],
                               light[gtk.STATE_SELECTED], 0.3)

        self.bg_colors = {
            gtk.STATE_NORMAL: (f(rgb.shade(mid[gtk.STATE_NORMAL], 1.3)),
                                f(mid[gtk.STATE_NORMAL])),

            gtk.STATE_ACTIVE: (f(rgb.shade(active, 1.3)),
                               f(active)),

            gtk.STATE_SELECTED: (f(rgb.shade(mid[gtk.STATE_NORMAL], 0.95)),
                                 f(rgb.shade(mid[gtk.STATE_NORMAL], 0.95))),

            self.PRELIT_NORMAL: (f(rgb.shade(mid[gtk.STATE_NORMAL], 1.35)),
                                 f(rgb.shade(mid[gtk.STATE_NORMAL], 1.15))),

            self.PRELIT_ACTIVE: (f(rgb.shade(active, 1.35)),
                                 f(rgb.shade(active, 1.15)))
            }

        self.dark_line_colors = {
            gtk.STATE_NORMAL: f(dark[gtk.STATE_ACTIVE]),
            gtk.STATE_ACTIVE: f(dark[gtk.STATE_ACTIVE]),
            gtk.STATE_SELECTED: f(rgb.shade(dark[gtk.STATE_ACTIVE], 0.95)),
            gtk.STATE_PRELIGHT: f(dark[gtk.STATE_PRELIGHT])
            }

        self.light_line_colors = {
            gtk.STATE_NORMAL: f(light[gtk.STATE_NORMAL]),
            gtk.STATE_ACTIVE: f(light[gtk.STATE_NORMAL]),
            gtk.STATE_SELECTED: None,
            gtk.STATE_PRELIGHT: f(light[gtk.STATE_PRELIGHT])
            }

        self.text_state = {
            gtk.STATE_NORMAL: gtk.STATE_NORMAL,
            gtk.STATE_ACTIVE: gtk.STATE_ACTIVE,
            gtk.STATE_SELECTED: gtk.STATE_NORMAL,
            gtk.STATE_PRELIGHT: gtk.STATE_PRELIGHT
            }

        self.base_hack = None
        return
예제 #3
0
    def load(self, style):
        mid = style.mid
        dark = style.dark
        light = style.light
        text = style.text
        active = rgb.mix_color(mid[gtk.STATE_NORMAL],
                               light[gtk.STATE_SELECTED], 0.3)

        self.bg_colors = {
            gtk.STATE_NORMAL: (f(rgb.shade(mid[gtk.STATE_NORMAL], 1.3)),
                                f(mid[gtk.STATE_NORMAL])),

            gtk.STATE_ACTIVE: (f(rgb.shade(active, 1.3)),
                               f(active)),

            gtk.STATE_SELECTED: (f(rgb.shade(mid[gtk.STATE_NORMAL], 0.95)),
                                 f(rgb.shade(mid[gtk.STATE_NORMAL], 0.95))),

            self.PRELIT_NORMAL: (f(rgb.shade(mid[gtk.STATE_NORMAL], 1.35)),
                                 f(rgb.shade(mid[gtk.STATE_NORMAL], 1.15))),

            self.PRELIT_ACTIVE: (f(rgb.shade(active, 1.35)),
                                 f(rgb.shade(active, 1.15)))
            }

        self.dark_line_colors = {
            gtk.STATE_NORMAL: f(dark[gtk.STATE_ACTIVE]),
            gtk.STATE_ACTIVE: f(dark[gtk.STATE_ACTIVE]),
            gtk.STATE_SELECTED: f(rgb.shade(dark[gtk.STATE_ACTIVE], 0.95)),
            gtk.STATE_PRELIGHT: f(dark[gtk.STATE_PRELIGHT])
            }

        self.light_line_colors = {
            gtk.STATE_NORMAL: f(light[gtk.STATE_NORMAL]),
            gtk.STATE_ACTIVE: f(light[gtk.STATE_NORMAL]),
            gtk.STATE_SELECTED: None,
            gtk.STATE_PRELIGHT: f(light[gtk.STATE_PRELIGHT])
            }

        self.text_state = {
            gtk.STATE_NORMAL: gtk.STATE_NORMAL,
            gtk.STATE_ACTIVE: gtk.STATE_ACTIVE,
            gtk.STATE_SELECTED: gtk.STATE_NORMAL,
            gtk.STATE_PRELIGHT: gtk.STATE_PRELIGHT
            }

        self.base_hack = None
        return