From kde-commits Sun May 16 13:24:17 2004 From: Luciano Montanaro Date: Sun, 16 May 2004 13:24:17 +0000 To: kde-commits Subject: kdeartwork/kwin-styles/kstep Message-Id: <20040516132417.5157322AE () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108471386413657 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);