예제 #1
0
파일: window.py 프로젝트: netphi/deepin-ui
 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"))
예제 #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"))
예제 #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"))
예제 #4
0
파일: window.py 프로젝트: masums/deepin-ui
    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"))
예제 #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"))
예제 #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"))