Introduce a convenience method isMaximized in KDecoration
Returns true in case of fully maximized, false otherwise. By that it ignores the horizontal and vertical modes.
This commit is contained in:
parent
22e4476777
commit
c918f40a77
4 changed files with 15 additions and 6 deletions
|
@ -437,11 +437,6 @@ void AuroraeClient::toggleKeepBelow()
|
|||
setKeepBelow(!keepBelow());
|
||||
}
|
||||
|
||||
bool AuroraeClient::isMaximized() const
|
||||
{
|
||||
return maximizeMode()==KDecorationDefines::MaximizeFull;
|
||||
}
|
||||
|
||||
void AuroraeClient::titlePressed(int button, int buttons)
|
||||
{
|
||||
titlePressed(static_cast<Qt::MouseButton>(button), static_cast<Qt::MouseButtons>(buttons));
|
||||
|
|
|
@ -120,7 +120,6 @@ public:
|
|||
virtual void resize(const QSize& s);
|
||||
// optional overrides
|
||||
virtual void padding(int &left, int &right, int &top, int &bottom) const;
|
||||
bool isMaximized() const;
|
||||
int doubleClickInterval() const;
|
||||
|
||||
bool animationsSupported() const;
|
||||
|
|
|
@ -133,6 +133,11 @@ KDecoration::MaximizeMode KDecoration::maximizeMode() const
|
|||
return bridge_->maximizeMode();
|
||||
}
|
||||
|
||||
bool KDecoration::isMaximized() const
|
||||
{
|
||||
return maximizeMode() == MaximizeFull;
|
||||
}
|
||||
|
||||
KDecoration::QuickTileMode KDecoration::quickTileMode() const
|
||||
{
|
||||
return bridge_->quickTileMode();
|
||||
|
|
|
@ -531,8 +531,18 @@ public:
|
|||
* Returns the current maximization mode of the decorated window.
|
||||
* Note that only fully maximized windows should be treated
|
||||
* as "maximized" (e.g. if the maximize button has only two states).
|
||||
* @see isMaximized
|
||||
*/
|
||||
MaximizeMode maximizeMode() const;
|
||||
/**
|
||||
* @brief Convenience method for the case that the decoration is
|
||||
* only interested in whether the decoration is in fully maximized
|
||||
* or restored state ignoring vertical and horizontal maximized modes.
|
||||
*
|
||||
* @return bool @c true if maximized fully, @c false otherwise
|
||||
* @see maximizeMode
|
||||
*/
|
||||
bool isMaximized() const;
|
||||
/**
|
||||
* Returns @a true if the decorated window can be minimized by the user.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue