use the new maximize() overload

svn path=/trunk/kdeartwork/kwin-styles/plastik/; revision=332085
This commit is contained in:
Sandro Giessl 2004-07-23 17:02:25 +00:00
parent 8b5755fb4c
commit 7e3a491809
3 changed files with 4 additions and 14 deletions

View file

@ -64,7 +64,7 @@ PlastikButton::PlastikButton(PlastikClient *parent, const char *name,
int size, bool toggle, int btns)
: QButton(parent->widget(), name),
m_client(parent),
m_lastMouse(0),
m_lastMouse(NoButton),
m_realizeButtons(btns),
m_size(size),
m_type(type),

View file

@ -41,7 +41,7 @@ public:
~PlastikButton();
QSize sizeHint() const; ///< Return size hint.
int lastMousePress() const { return m_lastMouse; }
ButtonState lastMousePress() const { return m_lastMouse; }
void reset() { repaint(false); }
PlastikClient * client() { return m_client; }
virtual void setOn(bool on);
@ -61,7 +61,7 @@ private:
private:
PlastikClient *m_client;
int m_lastMouse;
ButtonState m_lastMouse;
int m_realizeButtons;
int m_size;

View file

@ -797,17 +797,7 @@ void PlastikClient::slotMaximize()
{
if (m_button[MaxButton])
{
switch (m_button[MaxButton]->lastMousePress())
{
case MidButton:
maximize(maximizeMode() ^ MaximizeVertical );
break;
case RightButton:
maximize(maximizeMode() ^ MaximizeHorizontal );
break;
default:
maximize(maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull );
}
maximize(m_button[MaxButton]->lastMousePress() );
doShape();
}
}