Пример #1
0
 def on_expose_event(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     failed_pixbuf = self.failed_dpixbuf.get_pixbuf()
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "layoutLeft")
     pixbuf_offset_x = (rect.width - failed_pixbuf.get_width()) / 2 
     pixbuf_offset_y = (rect.height - failed_pixbuf.get_height()) / 2 - 50
     icon_x = rect.x + pixbuf_offset_x
     icon_y = rect.y + pixbuf_offset_y
     draw_pixbuf(cr, failed_pixbuf, icon_x, icon_y)
     
     text_y = icon_y + failed_pixbuf.get_height() + self.text_padding_y
     text_x = icon_x + self.text_padding_x
     
     _width, _height = get_content_size(self.prompt_text)
     
     self.text_rect = gtk.gdk.Rectangle(text_x - rect.x, text_y - rect.y,
                                        rect.x + rect.width -  text_x - pixbuf_offset_x,
                                        _height)
     
     if self.is_hover:        
         text_color = self.hover_text_dcolor.get_color()
     else:    
         text_color = self.normal_text_dcolor.get_color()
         
     draw_text(cr, self.prompt_text, text_x, text_y, self.text_rect.width, _height,
               text_color=text_color, 
               underline=True, 
               alignment=pango.ALIGN_CENTER)
     return True
Пример #2
0
 def on_expose_event(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width - 1, rect.height ,"layoutRight")
     
     draw_line(cr, (rect.x + 1, rect.y), 
               (rect.x + 1, rect.y + rect.height), "#b0b0b0")
     return False
Пример #3
0
 def on_expose_event(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     empty_pixbuf = self.empty_dpixbuf.get_pixbuf()
     
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "layoutLeft")
     
     icon_x = rect.x + (rect.width - empty_pixbuf.get_width()) / 2 
     icon_y = rect.y + (rect.height - empty_pixbuf.get_height()) / 2 - 50
     
     draw_pixbuf(cr, empty_pixbuf, icon_x, icon_y)
     
     return True
Пример #4
0
    def on_expose_event(self, widget, event):
        cr = widget.window.cairo_create()
        rect = widget.allocation
        empty_pixbuf = self.empty_dpixbuf.get_pixbuf()
        draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height,
                        "layoutLeft")
        pixbuf_offset_x = (rect.width - empty_pixbuf.get_width()) / 2
        pixbuf_offset_y = (rect.height - empty_pixbuf.get_height()) / 2 - 50
        icon_x = rect.x + pixbuf_offset_x
        icon_y = rect.y + pixbuf_offset_y
        draw_pixbuf(cr, empty_pixbuf, icon_x, icon_y)

        add_pixbuf = self.add_normal_dpixbuf.get_pixbuf()
        if self.is_hover:
            text_color = self.hover_text_dcolor.get_color()
            add_pixbuf = self.add_hover_dpixbuf.get_pixbuf()
        else:
            text_color = self.normal_text_dcolor.get_color()

        _width, _height = get_content_size(self.prompt_text)
        text_y = icon_y + empty_pixbuf.get_height() + self.text_padding_y

        add_icon_x = icon_x + self.prompt_offset
        add_icon_y = text_y + (_height - add_pixbuf.get_height()) / 2

        text_x = add_icon_x + add_pixbuf.get_width() + self.text_padding_x

        self.text_rect = gtk.gdk.Rectangle(
            text_x - rect.x, text_y - rect.y,
            rect.x + rect.width - text_x - pixbuf_offset_x, _height)

        draw_pixbuf(cr, add_pixbuf, add_icon_x, add_icon_y)
        draw_text(cr,
                  self.prompt_text,
                  text_x,
                  text_y,
                  self.text_rect.width,
                  _height,
                  text_color=text_color,
                  underline=True,
                  text_size=10)
        return True
Пример #5
0
    def on_expose_event(self, widget, event):    
        cr = widget.window.cairo_create()
        rect = widget.allocation
        empty_pixbuf = self.empty_dpixbuf.get_pixbuf()
        draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "layoutLeft")
        pixbuf_offset_x = (rect.width - empty_pixbuf.get_width()) / 2 
        pixbuf_offset_y = (rect.height - empty_pixbuf.get_height()) / 2 - 50
        icon_x = rect.x + pixbuf_offset_x
        icon_y = rect.y + pixbuf_offset_y
        draw_pixbuf(cr, empty_pixbuf, icon_x, icon_y)
        
        add_pixbuf = self.add_normal_dpixbuf.get_pixbuf()                
        if self.is_hover:        
            text_color = self.hover_text_dcolor.get_color()
            add_pixbuf = self.add_hover_dpixbuf.get_pixbuf()
        else:    
            text_color = self.normal_text_dcolor.get_color()
        
        _width, _height = get_content_size(self.prompt_text)
        text_y = icon_y + empty_pixbuf.get_height() + self.text_padding_y        
            
        add_icon_x = icon_x + self.prompt_offset    
        add_icon_y = text_y + (_height - add_pixbuf.get_height()) / 2

        text_x = add_icon_x + add_pixbuf.get_width() + self.text_padding_x
        
        
        self.text_rect = gtk.gdk.Rectangle(text_x - rect.x, text_y - rect.y,
                                           rect.x + rect.width -  text_x - pixbuf_offset_x,
                                           _height)
            
        
        draw_pixbuf(cr, add_pixbuf, add_icon_x, add_icon_y)            
        draw_text(cr, self.prompt_text, text_x, text_y, self.text_rect.width, _height,
                  text_color=text_color, underline=True, text_size=10)
        return True
Пример #6
0
    def draw_mask(self, widget, event):    
        cr = widget.window.cairo_create()
        rect = widget.allocation
        start_x = rect.x + 2
        start_y = rect.y + 8

        for size, color_info in self.rect_left_list:
            draw_alpha_mask(cr, start_x, start_y, size, rect.height - 8, color_info)
            start_x += size
        if self.draw_right_mask_flag:    
            draw_alpha_mask(cr, start_x, start_y, 140, rect.height - 8, "layoutRight")
            start_x += 140
            last_width = rect.width - (start_x - rect.x)    
            draw_alpha_mask(cr, start_x, start_y, last_width - 2, rect.height - 8, "layoutLast")
        return False
 def draw_view_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutMiddle")
 def expose_toolbar_mask(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x - 9, rect.y, rect.width + 18, rect.height, "lyricsMask")
     return False
Пример #9
0
 def draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
Пример #10
0
 def draw_bg_mask(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "frameLight")
 def draw_category_list_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
Пример #12
0
 def expose_entry_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x , rect.y, rect.width, rect.height, "toolbarEntry")
 def on_radiobar_draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
Пример #14
0
 def expose_entry_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x , rect.y, rect.width, rect.height, "toolbarEntry")
Пример #15
0
 def expose_upper_box_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width - 2, rect.height, "layoutLast")
     return False
Пример #16
0
 def draw_filter_view_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLast")
Пример #17
0
 def on_loginbox_expose(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height,
                     "layoutMiddle")
Пример #18
0
 def plugins_view_draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
 def on_webcastbar_draw_mask(self, cr, x, y, w, h):
     draw_alpha_mask(cr, x, y, w, h, "layoutRight")
Пример #20
0
 def on_radiobar_draw_mask(self, cr, x, y, w, h):
     draw_alpha_mask(cr, x, y, w, h, "layoutRight")
 def on_loginbox_expose(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y,
             rect.width, rect.height, "layoutMiddle")
Пример #22
0
    def on_sourcebar_draw_mask(self, cr, x, y, w, h):
        draw_alpha_mask(cr, x, y, w, h, "layoutRight")

        return False
 def on_iconview_draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLast")
Пример #24
0
 def plugins_view_draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
Пример #25
0
 def draw_mask(self, cr, x, y, width, height):    
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
Пример #26
0
 def expose_toolbar_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x - 9, rect.y, rect.width + 18, rect.height,
                     "lyricsMask")
     return False
    def on_sourcebar_draw_mask(self, cr, x, y, w, h):    
        draw_alpha_mask(cr, x, y, w, h ,"layoutRight")

        return False
 def draw_category_list_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
Пример #29
0
 def draw_mask(self, cr, x, y, w, h):
     draw_alpha_mask(cr, x, y, w, h, "layoutRight")
     return False
Пример #30
0
 def on_iconview_draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLast")
 def on_webcastbar_draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
Пример #32
0
 def draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
     return False
Пример #33
0
 def draw_treeview_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, ("#FFFFFF", 0.9))
Пример #34
0
 def draw_view_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutMiddle")
Пример #35
0
 def draw_bg_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height,
                     "frameLight")