Sync with maximizeChange(). If a decoration has only two button states

for the four maximize states, it should show the maximized one only
for the fully maximized state.


svn path=/trunk/KDE/kdebase/kwin/; revision=442352
This commit is contained in:
Luboš Luňák 2005-08-02 12:46:18 +00:00
parent ad0f24a19b
commit 326e9b2b41

View file

@ -373,7 +373,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn = createButton(MaxButton);
if (!btn) break;
btn->setRealizeButtons(Qt::LeftButton|Qt::MidButton|Qt::RightButton);
const bool max = maximizeMode()!=MaximizeRestore;
const bool max = maximizeMode()==MaximizeFull;
btn->setTipText(max?i18n("Restore"):i18n("Maximize") );
btn->setToggleButton(true);
btn->setOn( max );