[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeplayground-artwork/plastik2/decoration
From:       Sandro Giessl <sandro () giessl ! com>
Date:       2005-03-11 18:50:10
Message-ID: 20050311185010.82829EED3 () office ! kde ! org
[Download RAW message or body]

CVS commit by giessl: 

- s/cornerMask/cornerShape/
- make updateWindowShape virtual


  M +5 -5      kcommondecoration.cpp   1.6
  M +10 -2     kcommondecoration.h   1.4
  M +1 -1      plastikclient.cpp   1.6
  M +1 -1      plastikclient.h   1.5


--- kdeplayground-artwork/plastik2/decoration/kcommondecoration.cpp  #1.5:1.6
@@ -94,5 +94,5 @@ void KCommonDecoration::reset( unsigned 
 }
 
-QRegion KCommonDecoration::cornerMask(WindowCorner)
+QRegion KCommonDecoration::cornerShape(WindowCorner)
 {
     return QRegion();
@@ -660,20 +660,20 @@ void KCommonDecoration::updateWindowShap
     if(tl)
     {
-        mask -= cornerMask(WC_TopLeft);
+        mask -= cornerShape(WC_TopLeft);
     }
     // Remove top-right corner.
     if(tr)
     {
-        mask -= cornerMask(WC_TopRight);
+        mask -= cornerShape(WC_TopRight);
     }
         // Remove top-left corner.
     if(bl)
     {
-        mask -= cornerMask(WC_BottomLeft);
+        mask -= cornerShape(WC_BottomLeft);
     }
     // Remove top-right corner.
     if(br)
     {
-        mask -= cornerMask(WC_BottomRight);
+        mask -= cornerShape(WC_BottomRight);
     }
 

--- kdeplayground-artwork/plastik2/decoration/kcommondecoration.h  #1.3:1.4
@@ -169,5 +169,14 @@ class KCommonDecoration : public KDecora
          * @return the mask for the specific window corner.
          */
-        virtual QRegion cornerMask(WindowCorner corner);
+        virtual QRegion cornerShape(WindowCorner corner);
+
+        /**
+         * This updates the window mask using the information provided by
+         * cornerShape(). Edges which are aligned to screen corners are not
+         * shaped for better usability (remember to paint these areas in \
paintEvent(), too). +         * You normally don't want/need to reimplement \
updateWindowShape(). +         * @see cornerShape()
+         */
+        virtual void updateWindowShape();
 
         /**
@@ -245,5 +254,4 @@ class KCommonDecoration : public KDecora
         void addButtons(ButtonContainer &btnContainer, const QString& buttons);
 
-        void updateWindowShape();
         KCommonDecorationButton *m_button[NumButtons];
 

--- kdeplayground-artwork/plastik2/decoration/plastikclient.cpp  #1.5:1.6
@@ -210,5 +210,5 @@ void PlastikClient::init()
 }
 
-QRegion PlastikClient::cornerMask(WindowCorner corner)
+QRegion PlastikClient::cornerShape(WindowCorner corner)
 {
     int w = widget()->width();

--- kdeplayground-artwork/plastik2/decoration/plastikclient.h  #1.4:1.5
@@ -48,5 +48,5 @@ public:
     virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
     virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const \
                KCommonDecorationButton * = 0) const;
-    virtual QRegion cornerMask(WindowCorner corner);
+    virtual QRegion cornerShape(WindowCorner corner);
     virtual KCommonDecorationButton *createButton(ButtonType type);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic