def __scroll_cb(self, widget, event): d = self.SCROLL_DELTA if event.direction in (gdk.SCROLL_DOWN, gdk.SCROLL_LEFT): d *= -1 col = HSVColor(color=self.get_managed_color()) v = clamp(col.v + d, 0.0, 1.0) if col.v != v: col.v = v self.set_managed_color(col) return True
def __scroll_cb(self, widget, event): d = self.SCROLL_DELTA if event.direction in (gdk.SCROLL_DOWN, gdk.SCROLL_LEFT): d *= -1 col = HSVColor(color=self.get_managed_color()) v = clamp(col.v+d, 0.0, 1.0) if col.v != v: col.v = v self.set_managed_color(col) return True
def get_color_for_bar_amount(self, amt): col = HSVColor(color=self.get_managed_color()) col.v = amt return col