예제 #1
0
파일: overlay.py 프로젝트: nxmirrors/miro
 def drawTrack(self):
     from miro.frontends.widgets import widgetutil
     rect = self.bounds()
     ctx = drawing.DrawingContext(self, rect, rect)
     ctx.set_color((1,1,1), 0.4)
     widgetutil.circular_rect(ctx, 0, 2, rect.size.width, rect.size.height - 4)
     ctx.fill()
예제 #2
0
 def drawTrack(self):
     from miro.frontends.widgets import widgetutil
     rect = self.bounds()
     ctx = drawing.DrawingContext(self, rect, rect)
     ctx.set_color((1,1,1), 0.4)
     widgetutil.circular_rect(ctx, 0, 2, rect.size.width, rect.size.height - 4)
     ctx.fill()
예제 #3
0
 def draw(self, context, layout):
     widgetutil.circular_rect(context, 0, 0, context.width, context.height)
     gradient = widgetset.Gradient(0, 0, 0, context.height)
     gradient.set_start_color(self.BACKGROUND_GRADIENT_TOP)
     gradient.set_end_color(self.BACKGROUND_GRADIENT_BOTTOM)
     context.gradient_fill(gradient)
     progress_width = (
         (context.width - context.height) * self.progress_ratio +
         context.height)
     widgetutil.circular_rect_negative(context, 1, 1, progress_width - 2,
                                       context.height - 2)
     gradient = widgetset.Gradient(1, 1, 1, context.height - 2)
     gradient.set_start_color(self.PROGRESS_GRADIENT_TOP)
     gradient.set_end_color(self.PROGRESS_GRADIENT_BOTTOM)
     context.gradient_fill(gradient)
예제 #4
0
 def draw(self, context, layout):
     widgetutil.circular_rect(context, 0, 0, context.width, context.height)
     gradient = widgetset.Gradient(0, 0, 0, context.height)
     gradient.set_start_color(self.BACKGROUND_GRADIENT_TOP)
     gradient.set_end_color(self.BACKGROUND_GRADIENT_BOTTOM)
     context.gradient_fill(gradient)
     progress_width = (
         (context.width - context.height) * self.progress_ratio +
         context.height)
     widgetutil.circular_rect_negative(context, 1, 1,
                                       progress_width - 2,
                                       context.height - 2)
     gradient = widgetset.Gradient(1, 1, 1, context.height - 2)
     gradient.set_start_color(self.PROGRESS_GRADIENT_TOP)
     gradient.set_end_color(self.PROGRESS_GRADIENT_BOTTOM)
     context.gradient_fill(gradient)
예제 #5
0
 def _outer_border(self, context):
     widgetutil.circular_rect(context, self.x, self.y, self.width,
                              self.height)
예제 #6
0
파일: style.py 프로젝트: codito/miro
 def _outer_border(self, context):
     widgetutil.circular_rect(context, self.x, self.y,
             self.width, self.height)