From 60254757fe9fd9aa17197af80483333150a7a85a Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Sun, 9 Nov 2003 18:47:08 +0000 Subject: [PATCH] Fix #67681: "Plastik style often displays incorrect maximize button" CCMAIL: 67681-done@bugs.kde.org svn path=/trunk/kdeartwork/kwin-styles/plastik/; revision=265849 --- clients/plastik/plastikclient.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/clients/plastik/plastikclient.cpp b/clients/plastik/plastikclient.cpp index 6f6d721a99..74b732871b 100644 --- a/clients/plastik/plastikclient.cpp +++ b/clients/plastik/plastikclient.cpp @@ -720,7 +720,13 @@ void PlastikClient::maximizeChange() { if (!PlastikHandler::initialized()) return; - + if( m_button[MaxButton] ) { + m_button[MaxButton]->setMaximized( maximizeMode()!=MaximizeRestore); + m_button[MaxButton]->setTipText( (maximizeMode()==MaximizeRestore) ? + i18n("Maximize") + : i18n("Restore")); + m_button[MaxButton]->setDeco(); // update the button icon... + } } void PlastikClient::desktopChange() @@ -742,22 +748,13 @@ void PlastikClient::slotMaximize() { case MidButton: maximize(maximizeMode() ^ MaximizeVertical ); - maximizeChange(); break; case RightButton: maximize(maximizeMode() ^ MaximizeHorizontal ); - maximizeChange(); break; default: maximize(maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull ); - maximizeChange(); } - - m_button[MaxButton]->setMaximized( maximizeMode()!=MaximizeRestore); - m_button[MaxButton]->setTipText( (maximizeMode()==MaximizeRestore) ? - i18n("Maximize") - : i18n("Restore")); - m_button[MaxButton]->setDeco(); // update the button icon... doShape(); } }