Esempio n. 1
0
    def make_button(self, key):
        button = ColorButton.with_color(Color.from_string('#' + self.applet.settings[key]))

        button.key = key
        button.use_alpha = True
        button.connect('color-set', self.color_set)

        return button
Esempio n. 2
0
    def make_button(self, key):
        button = ColorButton.with_color(
            Color.from_string('#' + self.applet.settings[key]))

        button.key = key
        button.use_alpha = True
        button.connect('color-set', self.color_set)

        return button
 def __init__(self):
     super(TestColorButton, self).__init__()
     self.connect('delete-event', gtk.main_quit)
     color = desktopagnostic.Color.from_string('green')
     color.props.alpha = 2 ** 15 - 1
     button = ColorButton.with_color(color)
     button.connect('color-set', self.on_color_set)
     self.add(button)
     self.show_all()
 def __init__(self):
     super(TestColorButton, self).__init__()
     self.connect('delete-event', gtk.main_quit)
     color = desktopagnostic.Color.from_string('green')
     color.props.alpha = 2**15 - 1
     button = ColorButton.with_color(color)
     button.connect('color-set', self.on_color_set)
     self.add(button)
     self.show_all()