inform buttons of state change
svn path=/trunk/kdebase/kwin/; revision=398989
This commit is contained in:
parent
b4d6b5fd91
commit
c77a4202fb
2 changed files with 10 additions and 1 deletions
|
@ -405,6 +405,7 @@ void KCommonDecoration::maximizeChange()
|
||||||
m_button[MaxButton]->setTipText( (maximizeMode()!=MaximizeFull) ?
|
m_button[MaxButton]->setTipText( (maximizeMode()!=MaximizeFull) ?
|
||||||
i18n("Maximize")
|
i18n("Maximize")
|
||||||
: i18n("Restore"));
|
: i18n("Restore"));
|
||||||
|
m_button[MaxButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,6 +416,7 @@ void KCommonDecoration::desktopChange()
|
||||||
m_button[OnAllDesktopsButton]->setTipText( isOnAllDesktops() ?
|
m_button[OnAllDesktopsButton]->setTipText( isOnAllDesktops() ?
|
||||||
i18n("Not on all desktops")
|
i18n("Not on all desktops")
|
||||||
: i18n("On all desktops"));
|
: i18n("On all desktops"));
|
||||||
|
m_button[OnAllDesktopsButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,6 +428,7 @@ void KCommonDecoration::shadeChange()
|
||||||
m_button[ShadeButton]->setTipText( shaded ?
|
m_button[ShadeButton]->setTipText( shaded ?
|
||||||
i18n("Unshade")
|
i18n("Unshade")
|
||||||
: i18n("Shade"));
|
: i18n("Shade"));
|
||||||
|
m_button[ShadeButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,6 +437,7 @@ void KCommonDecoration::iconChange()
|
||||||
if (m_button[MenuButton])
|
if (m_button[MenuButton])
|
||||||
{
|
{
|
||||||
m_button[MenuButton]->update();
|
m_button[MenuButton]->update();
|
||||||
|
m_button[MenuButton]->reset(KCommonDecorationButton::IconChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,12 +458,14 @@ void KCommonDecoration::keepAboveChange(bool above)
|
||||||
{
|
{
|
||||||
m_button[AboveButton]->setOn(above);
|
m_button[AboveButton]->setOn(above);
|
||||||
m_button[AboveButton]->setTipText( above?i18n("Do not keep above others"):i18n("Keep above others") );
|
m_button[AboveButton]->setTipText( above?i18n("Do not keep above others"):i18n("Keep above others") );
|
||||||
|
m_button[AboveButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_button[BelowButton] && m_button[BelowButton]->isOn())
|
if (m_button[BelowButton] && m_button[BelowButton]->isOn())
|
||||||
{
|
{
|
||||||
m_button[BelowButton]->setOn(false);
|
m_button[BelowButton]->setOn(false);
|
||||||
m_button[BelowButton]->setTipText( i18n("Keep below others") );
|
m_button[BelowButton]->setTipText( i18n("Keep below others") );
|
||||||
|
m_button[BelowButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,12 +475,14 @@ void KCommonDecoration::keepBelowChange(bool below)
|
||||||
{
|
{
|
||||||
m_button[BelowButton]->setOn(below);
|
m_button[BelowButton]->setOn(below);
|
||||||
m_button[BelowButton]->setTipText( below?i18n("Do not keep below others"):i18n("Keep below others") );
|
m_button[BelowButton]->setTipText( below?i18n("Do not keep below others"):i18n("Keep below others") );
|
||||||
|
m_button[BelowButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_button[AboveButton] && m_button[AboveButton]->isOn())
|
if (m_button[AboveButton] && m_button[AboveButton]->isOn())
|
||||||
{
|
{
|
||||||
m_button[AboveButton]->setOn(false);
|
m_button[AboveButton]->setOn(false);
|
||||||
m_button[AboveButton]->setTipText( i18n("Keep above others") );
|
m_button[AboveButton]->setTipText( i18n("Keep above others") );
|
||||||
|
m_button[AboveButton]->reset(KCommonDecorationButton::StateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,8 @@ class KWIN_EXPORT KCommonDecorationButton : public QButton
|
||||||
SizeChange = 1 << 1, ///< The button size changed @see setSize()
|
SizeChange = 1 << 1, ///< The button size changed @see setSize()
|
||||||
ToggleChange = 1 << 2, ///< The button toggle state has changed @see setToggleButton()
|
ToggleChange = 1 << 2, ///< The button toggle state has changed @see setToggleButton()
|
||||||
StateChange = 1 << 3, ///< The button has been set pressed or not... @see setOn()
|
StateChange = 1 << 3, ///< The button has been set pressed or not... @see setOn()
|
||||||
DecorationReset = 1 << 4 ///< E.g. when decoration colors have changed
|
IconChange = 1 << 4, ///< The window icon has been changed
|
||||||
|
DecorationReset = 1 << 5 ///< E.g. when decoration colors have changed
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Initialize the button after size change etc.
|
* Initialize the button after size change etc.
|
||||||
|
|
Loading…
Reference in a new issue