Esempio n. 1
0
    def __init__(self):
        _Page.__init__(self)

        vbox = Gtk.VBox(spacing=style.DEFAULT_SPACING)
        self.pack_start(vbox, expand=True, fill=False, padding=0)

        self._label = Gtk.Label(label=_('Click to change color:'))
        vbox.pack_start(self._label, True, True, 0)

        self._cp = colorpicker.ColorPicker()
        vbox.pack_start(self._cp, True, True, 0)

        self._color = self._cp.get_color()
        self.set_valid(True)
Esempio n. 2
0
    def __init__(self):
        _Page.__init__(self)

        alignment = Gtk.Alignment.new(0.5, 0.5, 0, 0)
        self.pack_start(alignment, expand=True, fill=True, padding=0)

        grid = Gtk.Grid()
        grid.set_column_spacing(style.DEFAULT_SPACING)
        alignment.add(grid)

        label = Gtk.Label(label=_('Click to change color:'))
        grid.attach(label, 0, 0, 1, 1)
        label.show()

        self._cp = colorpicker.ColorPicker()
        grid.attach(self._cp, 0, 1, 1, 1)
        self._cp.show()

        grid.show()
        alignment.show()

        self._color = self._cp.get_color()
        self.set_valid(True)