From f761aceb8b11bb95f8eba11c7ae6043d6a7ec4f6 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sat, 17 Oct 2009 06:57:17 +0000 Subject: [PATCH] removed background window rendering from button paintEvent, as transparent background is good enough. Moved all corresponding method in oxygenClient to 'protected'. This allows faster repaint. svn path=/trunk/KDE/kdebase/workspace/; revision=1036357 --- clients/oxygen/oxygenbutton.cpp | 13 -------- clients/oxygen/oxygenclient.h | 54 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 40 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 6929920e5c..a3d56c2e15 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -175,19 +175,6 @@ namespace Oxygen else palette.setCurrentColorGroup(QPalette::Inactive); QColor color = palette.window().color(); - // window background - if( type_ != ButtonItemClose && type_ != ButtonItemMenu ) - { - - client_.renderWindowBackground( &painter, rect(), this, client_.backgroundPalette( this, palette ) ); - client_.renderWindowBorder( &painter, rect(), this, palette ); - - // separator - if( client_.drawSeparator() ) - { client_.renderSeparator( &painter, rect(), this, color ); } - - } - // translate buttons up if window maximized if( client_.compositingActive() && diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index 10605a8973..1fa5104533 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -141,6 +141,33 @@ namespace Oxygen //@} + //!@name status change methods (overloaded from KCommonDecorationUnstable) + //@{ + + //! triggered when window activity is changed + virtual void activeChange(); + + //! triggered when maximize state changed + virtual void maximizeChange(); + + //! triggered when window shade is changed + virtual void shadeChange(); + + //! triggered when window shade is changed + virtual void captionChange(); + + //@} + + public slots: + + //! reset configuration + void resetConfiguration( void ); + + protected: + + //! paint + virtual void paintEvent( QPaintEvent* ); + //!@name rendering methods (called in paintEvent) //@{ @@ -171,33 +198,6 @@ namespace Oxygen //@} - //!@name status change methods (overloaded from KCommonDecorationUnstable) - //@{ - - //! triggered when window activity is changed - virtual void activeChange(); - - //! triggered when maximize state changed - virtual void maximizeChange(); - - //! triggered when window shade is changed - virtual void shadeChange(); - - //! triggered when window shade is changed - virtual void captionChange(); - - //@} - - public slots: - - //! reset configuration - void resetConfiguration( void ); - - protected: - - //! paint - virtual void paintEvent( QPaintEvent* ); - //! title timeline bool titleTimeLineIsRunning( void ) const { return titleTimeLine_.state() == QTimeLine::Running; }