diff --git a/clients/plastik/plastikbutton.cpp b/clients/plastik/plastikbutton.cpp index 022b870e98..8789560696 100644 --- a/clients/plastik/plastikbutton.cpp +++ b/clients/plastik/plastikbutton.cpp @@ -1,5 +1,5 @@ /* Plastik KWin window decoration - Copyright (C) 2003 Sandro Giessl + Copyright (C) 2003-2005 Sandro Giessl based on the window decoration "Web": Copyright (C) 2001 Rik Hemsley (rikkus) @@ -23,13 +23,10 @@ // #include #include -#include -#include #include #include #include #include -#include #include #include "plastikbutton.h" @@ -116,6 +113,14 @@ void PlastikButton::reset(unsigned long changed) break; } + // button mask + if (type() != MenuButton) { + QRegion mask(rect() ); + mask -= QRegion(0,0,1,1) + QRegion(0,height()-1,1,1) + + QRegion(width()-1,0,1,1) + QRegion(width()-1,height()-1,1,1); + setMask(mask); + } + this->update(); } } @@ -168,7 +173,6 @@ void PlastikButton::drawButton(QPainter *painter) QRect r(0,0,width(),height()); bool active = m_client->isActive(); - QPixmap backgroundTile = m_client->getTitleBarTile(active); KPixmap tempKPixmap; QColor highlightColor; @@ -205,8 +209,11 @@ void PlastikButton::drawButton(QPainter *painter) buffer.resize(width(), height()); QPainter bP(&buffer); - // fill with the titlebar background - bP.drawTiledPixmap(0, 0, width(), width(), backgroundTile); + if (type() == MenuButton) + { + // fake the titlebar background + bP.drawTiledPixmap(0, 0, width(), width(), m_client->getTitleBarTile(active) ); + } if (type() != MenuButton || hover || animProgress != 0) { // contour diff --git a/clients/plastik/plastikbutton.h b/clients/plastik/plastikbutton.h index 3ed461a782..81f4eab413 100644 --- a/clients/plastik/plastikbutton.h +++ b/clients/plastik/plastikbutton.h @@ -1,5 +1,5 @@ /* Plastik KWin window decoration - Copyright (C) 2003 Sandro Giessl + Copyright (C) 2003-2005 Sandro Giessl based on the window decoration "Web": Copyright (C) 2001 Rik Hemsley (rikkus) diff --git a/clients/plastik/plastikclient.cpp b/clients/plastik/plastikclient.cpp index f323db2dbf..dd9d756caa 100644 --- a/clients/plastik/plastikclient.cpp +++ b/clients/plastik/plastikclient.cpp @@ -1,5 +1,5 @@ /* Plastik KWin window decoration - Copyright (C) 2003 Sandro Giessl + Copyright (C) 2003-2005 Sandro Giessl based on the window decoration "Web": Copyright (C) 2001 Rik Hemsley (rikkus) @@ -21,9 +21,6 @@ */ #include -#include -#include -#include #include #include diff --git a/clients/plastik/plastikclient.h b/clients/plastik/plastikclient.h index 05280d43f7..0ea0e04201 100644 --- a/clients/plastik/plastikclient.h +++ b/clients/plastik/plastikclient.h @@ -1,5 +1,5 @@ /* Plastik KWin window decoration - Copyright (C) 2003 Sandro Giessl + Copyright (C) 2003-2005 Sandro Giessl based on the window decoration "Web": Copyright (C) 2001 Rik Hemsley (rikkus) @@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */ -#ifndef KNIFTYCLIENT_H -#define KNIFTYCLIENT_H +#ifndef PLASTIKCLIENT_H +#define PLASTIKCLIENT_H #include @@ -70,4 +70,4 @@ private: } // KWinPlastik -#endif // KNIFTCLIENT_H +#endif // PLASTIKCLIENT_H