Exemple #1
0
    def _show_picker(self, widget_tree):
        main_window = widget_tree.get_object("RGBPicker")
        c_widget = widget_tree.get_object("RGBColour")
        c_widget.set_current_color(g15convert.to_color(self.picker.color))

        def colour_picked(arg):
            self.picker._select_color(g15convert.color_to_rgb(c_widget.get_current_color()))

        c_widget.connect("color-changed", colour_picked)
        main_window.set_transient_for(self.get_toplevel())
        main_window.run()
        main_window.hide()
Exemple #2
0
    def _show_picker(self, widget_tree):
        main_window = widget_tree.get_object("RGBPicker")
        c_widget = widget_tree.get_object("RGBColour")
        c_widget.set_current_color(g15convert.to_color(self.picker.color))

        def colour_picked(arg):
            self.picker._select_color(g15convert.color_to_rgb(c_widget.get_current_color()))

        c_widget.connect("color-changed", colour_picked)
        main_window.set_transient_for(self.get_toplevel())
        main_window.run()
        main_window.hide()
Exemple #3
0
def to_color(rgb):
    return g15convert.to_color(rgb)