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

List:       kde-commits
Subject:    kdeartwork/kwin-styles/kstep
From:       Luciano Montanaro <mikelima () virgilio ! it>
Date:       2004-05-16 13:24:17
Message-ID: 20040516132417.5157322AE () office ! kde ! org
[Download RAW message or body]

CVS commit by montanaro: 

Added custom drawbounds() function that resembles a bit more what e.g.
WindowMaker uses.


  M +16 -0     nextclient.cpp   1.43
  M +2 -1      nextclient.h   1.22


--- kdeartwork/kwin-styles/kstep/nextclient.cpp  #1.42:1.43
@@ -709,4 +709,20 @@ bool NextClient::eventFilter(QObject *o,
 }
 
+bool NextClient::drawbound(const QRect& geom, bool /* clear */)
+{
+    QPainter p(workspaceWidget());
+    p.setPen(QPen(Qt::white, 3));
+    p.setRasterOp(Qt::XorROP);
+    p.drawRect(geom);
+    int leftMargin = geom.left() + 2;
+    p.fillRect(leftMargin, geom.top() + titleHeight - 1,
+            geom.width() - 4, 3, Qt::white);
+    if (isResizable()) {
+        p.fillRect(leftMargin, geom.bottom() - handleSize - 1,
+                geom.width() - 4, 3, Qt::white);
+    }       
+    return true;
+}
+
 // =====================================
 

--- kdeartwork/kwin-styles/kstep/nextclient.h  #1.21:1.22
@@ -44,7 +44,8 @@ class NextClient : public KDecoration
     Q_OBJECT
 public:
-    NextClient(KDecorationBridge * b, KDecorationFactory *f);
+    NextClient(KDecorationBridge *b, KDecorationFactory *f);
     ~NextClient() {;}
     void init();
+    virtual bool drawbound(const QRect& geom, bool clear);
 protected:
     bool eventFilter(QObject *o, QEvent *e);


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

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