def __init__(self): """Initialize""" Gtk.VBox.__init__(self) ColorAdjuster.__init__(self) self._updating = False hsv = Gtk.HSV() hsv.set_size_request(MIN_SIZE, MIN_SIZE) hsv.connect("changed", self._hsv_changed_cb) hsv.connect("size-allocate", self._hsv_alloc_cb) self.pack_start(hsv, True, True) self._hsv_widget = hsv
def set_color_manager(self, manager): """Sets the color manager, and reads an initial mask from prefs. Extends `ColorAdjuster`'s implementation. """ ColorAdjuster.set_color_manager(self, manager) prefs = self.get_prefs() mask_flat = prefs.get(PREFS_MASK_KEY, None) mask_active = prefs.get(PREFS_ACTIVE_KEY, False) if mask_flat is not None: self.set_mask(self._unflatten_mask(mask_flat)) self.mask_toggle.set_active(mask_active)
def __init__(self): self._faces = ['h', 's', 'v'] gtk.VBox.__init__(self) ColorAdjuster.__init__(self) self.__square = _HSVSquareInnerSquare(self) self.__ring = _HSVSquareOuterRing(self) s_align = gtk.Alignment(xalign=0.5, yalign=0.5, xscale=0.54, yscale=0.54) plz_be_square = gtk.AspectFrame() plz_be_square.set_shadow_type(gtk.SHADOW_NONE) s_align.add(plz_be_square) plz_be_square.add(self.__square) self.__ring.add(s_align) self.pack_start(self.__ring, True, True)
def __init__(self): self._faces = ['h', 's', 'v'] gtk.VBox.__init__(self) ColorAdjuster.__init__(self) self.__slice = HSVCubeSlice(self) self.__slider = HSVCubeSlider(self) s_align = gtk.Alignment(xalign=0.5, yalign=0.5, xscale=0.54, yscale=0.54) plz_be_square = gtk.AspectFrame() plz_be_square.set_shadow_type(gtk.SHADOW_NONE) s_align.add(plz_be_square) plz_be_square.add(self.__slice) self.__slider.add(s_align) self.pack_start(self.__slider, True, True)
def set_color_manager(self, mgr): self.grid.set_color_manager(mgr) ColorAdjuster.set_color_manager(self, mgr)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) self.__slider.set_color_manager(manager) self.__slice.set_color_manager(manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) self.__y_adj.set_property("color-manager", manager) self.__hc_adj.set_property("color-manager", manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) for slider in self.__sliders: slider.set_color_manager(manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) self.__square.set_color_manager(manager) self.__ring.set_color_manager(manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) self.__adj.set_color_manager(manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) for slider in self._sliders: slider.set_color_manager(manager)
def set_color_manager(self, manager): ColorAdjuster.set_color_manager(self, manager) for adj in self.__adjusters: adj.set_color_manager(manager)