[#2764] [Scheduler] Fix corrupt plugin prefs page on osx
This commit is contained in:
parent
64bba77807
commit
e4f2a450d6
|
@ -77,20 +77,20 @@ class SchedulerSelectWidget(gtk.DrawingArea):
|
||||||
|
|
||||||
#redraw the whole thing
|
#redraw the whole thing
|
||||||
def expose(self, widget, event):
|
def expose(self, widget, event):
|
||||||
self.context = self.window.cairo_create()
|
context = self.window.cairo_create()
|
||||||
self.context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height)
|
context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height)
|
||||||
self.context.clip()
|
context.clip()
|
||||||
|
|
||||||
width = self.window.get_size()[0]
|
width = self.window.get_size()[0]
|
||||||
height = self.window.get_size()[1]
|
height = self.window.get_size()[1]
|
||||||
|
|
||||||
for y in xrange(7):
|
for y in xrange(7):
|
||||||
for x in xrange(24):
|
for x in xrange(24):
|
||||||
self.context.set_source_rgba(self.colors[self.button_state[x][y]][0], self.colors[self.button_state[x][y]][1], self.colors[self.button_state[x][y]][2], 0.7)
|
context.set_source_rgba(self.colors[self.button_state[x][y]][0], self.colors[self.button_state[x][y]][1], self.colors[self.button_state[x][y]][2], 0.7)
|
||||||
self.context.rectangle(width*(6*x/145.0+1/145.0), height*(6*y/43.0+1/43.0), 5*width/145.0, 5*height/43.0)
|
context.rectangle(width*(6*x/145.0+1/145.0), height*(6*y/43.0+1/43.0), 5*width/145.0, 5*height/43.0)
|
||||||
self.context.fill_preserve()
|
context.fill_preserve()
|
||||||
self.context.set_source_rgba(0.5, 0.5, 0.5, 0.5)
|
context.set_source_rgba(0.5, 0.5, 0.5, 0.5)
|
||||||
self.context.stroke()
|
context.stroke()
|
||||||
|
|
||||||
#coordinates --> which box
|
#coordinates --> which box
|
||||||
def get_point(self, event):
|
def get_point(self, event):
|
||||||
|
|
Loading…
Reference in New Issue