예제 #1
0
 def _draw_thumbnail(self, context, x, y, width, height):
     fraction = 1.0
     if not self.data.state == 'running':
         fraction = 0.4
     icon = imagepool.get_surface(self.data.item_thumbnail, (width, height))
     widgetutil.draw_rounded_icon(context, icon, x, y, width, height, fraction=fraction)
     self.THUMB_OVERLAY.draw(context, x, y, width, height, fraction=fraction)
예제 #2
0
 def draw(self, context, layout):
     widgetutil.draw_rounded_icon(context, self.icon, 0, 0, 41, 41,
                                  inset=1)
     context.set_line_width(1)
     # Draw the black inner border
     context.set_color((0, 0, 0), 0.16)
     widgetutil.round_rect(context, 1.5, 1.5, 38, 38, 3)
     context.stroke()
     # Draw the white outer border
     context.set_color((1, 1, 1), 0.76)
     widgetutil.round_rect(context, 0.5, 0.5, 40, 40, 3)
     context.stroke()