示例#1
0
    def draw(self, context, layout):
        # we draw the rectangle off the bottom so that it's flat
        widgetutil.round_rect(context, 0, 0, context.width,
                              context.height + 10, 10)

        context.set_color(widgetutil.css_to_color('#9199bd'))
        context.fill()
        widgetutil.round_rect_reverse(context, 1, 1, context.width - 2,
                                      context.height + 10, 10)
        context.set_color(widgetutil.css_to_color('#bec1d0'))
        context.fill()
示例#2
0
    def draw(self, context, layout):
        # we draw the rectangle off the bottom so that it's flat
        widgetutil.round_rect(context, 0, 0, context.width,
                              context.height + 10, 10)

        context.set_color(widgetutil.css_to_color('#9199bd'))
        context.fill()
        widgetutil.round_rect_reverse(context, 1, 1, context.width - 2,
                                      context.height + 10, 10)
        context.set_color(widgetutil.css_to_color('#bec1d0'))
        context.fill()
示例#3
0
    def draw(self, context, layout):
        width, height = self.get_width(), self.get_height()
        x, y = (context.width - width) / 2, (context.height - height) / 2
        widgetutil.round_rect(context, x, y, width, height, 20)
        context.set_color(self.BG_COLOR)
        context.fill()
        widgetutil.round_rect(context, x, y, width, height, 20)
        widgetutil.round_rect_reverse(context, x+1, y+1, width-2, height-2, 20)
        context.set_color(self.BORDER_COLOR)
        context.fill()
        total = y
        for child in self.children_start[:-1]:
            total += child.get_height()
            context.rectangle(x, total, width, 1)
            context.fill()

        widgetset.Background.draw(self, context, layout)
示例#4
0
    def draw(self, context, layout):
        width, height = self.get_width(), self.get_height()
        x, y = (context.width - width) / 2, (context.height - height) / 2
        widgetutil.round_rect(context, x, y, width, height, 20)
        context.set_color(self.BG_COLOR)
        context.fill()
        widgetutil.round_rect(context, x, y, width, height, 20)
        widgetutil.round_rect_reverse(context, x + 1, y + 1, width - 2,
                                      height - 2, 20)
        context.set_color(self.BORDER_COLOR)
        context.fill()
        total = y
        for child in self.children_start[:-1]:
            total += child.get_height()
            context.rectangle(x, total, width, 1)
            context.fill()

        widgetset.Background.draw(self, context, layout)