Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 def get_color_for_bar_amount(self, amt):
     col = HSVColor(color=self.get_managed_color())
     col.v = amt
     return col
Beispiel #4
0
 def get_color_for_bar_amount(self, amt):
     col = HSVColor(color=self.get_managed_color())
     col.v = amt
     return col