Esempio n. 1
0
    def __init__(self):
        table = gtk.Table(rows=1, columns=2)

        self.__v_adj = HSVValueSlider()
        self.__v_adj.vertical = True
        self.__hs_adj = HSVHueSaturationWheel()

        row = 0
        xopts = gtk.FILL | gtk.EXPAND
        yopts = gtk.FILL | gtk.EXPAND
        v_align = gtk.Alignment(xalign=1, yalign=0, xscale=0, yscale=1)
        v_align.add(self.__v_adj)
        table.attach(v_align, 0, 1, row, row + 1, gtk.FILL, yopts, 3, 3)
        table.attach(self.__hs_adj, 1, 2, row, row + 1, xopts, yopts, 3, 3)

        self.__table = table
Esempio n. 2
0
class HSVAdjusterPage (CombinedAdjusterPage):
    """Page details for the HSV wheel.
    """

    def __init__(self):

        self.__v_adj = HSVValueSlider()
        self.__v_adj.vertical = True
        v_align = Gtk.Alignment(xalign=1, yalign=0, xscale=0, yscale=1)
        v_align.add(self.__v_adj)

        self.__hs_adj = HSVHueSaturationWheel()

        table = Gtk.Table(rows=1, columns=2)
        row = 0
        xopts = Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND
        yopts = Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND
        table.attach(
            v_align, 0, 1, row, row+1,
            Gtk.AttachOptions.FILL, yopts, 3, 3)
        table.attach(self.__hs_adj, 1, 2, row, row+1, xopts, yopts, 3, 3)

        self.__table = table

    @classmethod
    def get_page_icon_name(self):
        return 'mypaint-tool-hsvwheel'

    @classmethod
    def get_page_title(self):
        return _('HSV Wheel')

    @classmethod
    def get_page_description(self):
        return _("Saturation and Value color changer.")

    def get_page_widget(self):
        frame = Gtk.AspectFrame(obey_child=True)
        frame.set_shadow_type(Gtk.ShadowType.NONE)
        frame.add(self.__table)
        return frame

    def set_color_manager(self, manager):
        CombinedAdjusterPage.set_color_manager(self, manager)
        self.__v_adj.set_color_manager(manager)
        self.__hs_adj.set_color_manager(manager)
Esempio n. 3
0
class HSVAdjusterPage (CombinedAdjusterPage):
    """Page details for the HSV wheel.
    """

    def __init__(self):

        self.__v_adj = HSVValueSlider()
        self.__v_adj.vertical = True
        v_align = Gtk.Alignment(xalign=1, yalign=0, xscale=0, yscale=1)
        v_align.add(self.__v_adj)

        self.__hs_adj = HSVHueSaturationWheel()

        table = Gtk.Table(rows=1, columns=2)
        row = 0
        xopts = Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND
        yopts = Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND
        table.attach(
            v_align, 0, 1, row, row+1,
            Gtk.AttachOptions.FILL, yopts, 3, 3)
        table.attach(self.__hs_adj, 1, 2, row, row+1, xopts, yopts, 3, 3)

        self.__table = table

    @classmethod
    def get_page_icon_name(self):
        return 'mypaint-tool-hsvwheel'

    @classmethod
    def get_page_title(self):
        return _('HSV Wheel')

    @classmethod
    def get_page_description(self):
        return _("Saturation and Value color changer.")

    def get_page_widget(self):
        frame = Gtk.AspectFrame(obey_child=True)
        frame.set_shadow_type(Gtk.ShadowType.NONE)
        frame.add(self.__table)
        return frame

    def set_color_manager(self, manager):
        CombinedAdjusterPage.set_color_manager(self, manager)
        self.__v_adj.set_color_manager(manager)
        self.__hs_adj.set_color_manager(manager)
Esempio n. 4
0
    def __init__(self):
        table = gtk.Table(rows=1, columns=2)

        self.__v_adj = HSVValueSlider()
        self.__v_adj.vertical = True
        self.__hs_adj = HSVHueSaturationWheel()

        row = 0
        xopts = gtk.FILL | gtk.EXPAND
        yopts = gtk.FILL | gtk.EXPAND
        v_align = gtk.Alignment(xalign=1, yalign=0, xscale=0, yscale=1)
        v_align.add(self.__v_adj)
        table.attach(v_align, 0, 1, row, row+1, gtk.FILL, yopts, 3, 3)
        table.attach(self.__hs_adj, 1, 2, row, row+1, xopts, yopts, 3, 3)

        self.__table = table