Exemplo n.º 1
0
 def expose_window_shadow(self, widget, event):
     '''Callback for 'expose-event' event of window shadow.'''
     if self.shadow_is_visible:
         # Init.
         cr = widget.window.cairo_create()
         rect = widget.allocation
         x, y, w, h = rect.x, rect.y, rect.width, rect.height
         
         # Draw window shadow.
         draw_window_shadow(cr, x, y, w, h, self.shadow_radius, self.shadow_padding, ui_theme.get_shadow_color("window_shadow"))
Exemplo n.º 2
0
 def expose_window_shadow(self, widget, event):
     '''Callback for 'expose-event' event of window shadow.'''
     if self.shadow_is_visible:
         # Init.
         cr = widget.window.cairo_create()
         rect = widget.allocation
         x, y, w, h = rect.x, rect.y, rect.width, rect.height
         
         # Clear color to transparent window.
         cr.set_source_rgba(0.0, 0.0, 0.0, 0.0)
         cr.set_operator(cairo.OPERATOR_SOURCE)
         cr.paint()
     
         # Draw window shadow.
         draw_window_shadow(cr, x, y, w, h, self.shadow_radius, self.shadow_padding, ui_theme.get_shadow_color("window_shadow"))
Exemplo n.º 3
0
    def expose_window_shadow(self, widget, event):
        '''
        Internal function to expose the window shadow.

        @param widget: the window of gtk.Widget.
        @param event: The expose event of type gtk.gdk.Event.
        '''
        if self.shadow_is_visible:
            # Init.
            cr = widget.window.cairo_create()
            rect = widget.allocation
            x, y, w, h = rect.x, rect.y, rect.width, rect.height
            
            # Draw window shadow.
            draw_window_shadow(cr, x, y, w, h, self.shadow_radius, self.shadow_padding, ui_theme.get_shadow_color("window_shadow"))
Exemplo n.º 4
0
    def expose_window_shadow(self, widget, event):
        '''
        Internal function to expose the window shadow.

        @param widget: the window of gtk.Widget.
        @param event: The expose event of type gtk.gdk.Event.
        '''
        if self.expose_shadow_function:
            self.expose_shadow_function(widget, event)
        elif self.shadow_is_visible:
            # Init.
            cr = widget.window.cairo_create()
            rect = widget.allocation
            x, y, w, h = rect.x, rect.y, rect.width, rect.height

            # Draw window shadow.
            draw_window_shadow(cr, x, y, w, h, self.shadow_radius,
                               self.shadow_padding,
                               ui_theme.get_shadow_color("window_shadow"))
Exemplo n.º 5
0
    def expose_window_shadow(self, widget, event):
        """
        Internal fucntion to expose the window shadow.

        @param widget: the window of gtk.Widget.
        @param event: The expose event of type gtk.gdk.Event.
        """
        if self.shadow_is_visible:
            # Init.
            cr = widget.window.cairo_create()
            rect = widget.allocation
            x, y, w, h = rect.x, rect.y, rect.width, rect.height
            
            # Clear color to transparent window.
            cr.set_source_rgba(0.0, 0.0, 0.0, 0.0)
            cr.set_operator(cairo.OPERATOR_SOURCE)
            cr.paint()
        
            # Draw window shadow.
            draw_window_shadow(cr, x, y, w, h, self.shadow_radius, self.shadow_padding, ui_theme.get_shadow_color("window_shadow"))
Exemplo n.º 6
0
    def expose_window_shadow(self, widget, event):
        '''
        Internal fucntion to expose the window shadow.

        @param widget: the window of gtk.Widget.
        @param event: The expose event of type gtk.gdk.Event.
        '''
        if self.shadow_is_visible:
            # Init.
            cr = widget.window.cairo_create()
            rect = widget.allocation
            x, y, w, h = rect.x, rect.y, rect.width, rect.height

            # Clear color to transparent window.
            cr.set_source_rgba(0.0, 0.0, 0.0, 0.0)
            cr.set_operator(cairo.OPERATOR_SOURCE)
            cr.paint()

            # Draw window shadow.
            draw_window_shadow(cr, x, y, w, h, self.shadow_radius,
                               self.shadow_padding,
                               ui_theme.get_shadow_color("window_shadow"))