示例#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)