1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-23 10:03:43 +03:00

expose isShownFully to ViewPart::Visibility

This commit is contained in:
Michail Vourlakos 2021-05-13 19:14:33 +03:00
parent c0e768c73c
commit 8028efaa6c
3 changed files with 28 additions and 0 deletions

View File

@ -495,6 +495,21 @@ void VisibilityManager::setIsHidden(bool isHidden)
emit isHiddenChanged();
}
bool VisibilityManager::isShownFully() const
{
return m_isShownFully;
}
void VisibilityManager::setIsShownFully(bool fully)
{
if (m_isShownFully == fully) {
return;
}
m_isShownFully = fully;
emit isShownFullyChanged();
}
bool VisibilityManager::hidingIsBlocked() const
{
return (m_blockHidingEvents.count() > 0);

View File

@ -59,6 +59,7 @@ class VisibilityManager : public QObject
Q_PROPERTY(bool raiseOnDesktop READ raiseOnDesktop WRITE setRaiseOnDesktop NOTIFY raiseOnDesktopChanged)
Q_PROPERTY(bool raiseOnActivity READ raiseOnActivity WRITE setRaiseOnActivity NOTIFY raiseOnActivityChanged)
Q_PROPERTY(bool isHidden READ isHidden WRITE setIsHidden NOTIFY isHiddenChanged)
Q_PROPERTY(bool isShownFully READ isShownFully WRITE setIsShownFully NOTIFY isShownFullyChanged)
Q_PROPERTY(bool isBelowLayer READ isBelowLayer NOTIFY isBelowLayerChanged)
Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged)
@ -98,6 +99,9 @@ public:
bool isHidden() const;
void setIsHidden(bool isHidden);
bool isShownFully() const;
void setIsShownFully(bool fully);
bool hidingIsBlocked() const;
bool containsMouse() const;
@ -152,6 +156,7 @@ signals:
void isBelowLayerChanged();
void isFloatingGapWindowEnabledChanged();
void isHiddenChanged();
void isShownFullyChanged();
void hidingIsBlockedChanged();
void containsMouseChanged();
void strutsThicknessChanged();
@ -226,6 +231,7 @@ private:
bool m_isBelowLayer{false};
bool m_isHidden{false};
bool m_isFloatingGapWindowEnabled{false};
bool m_isShownFully{false};
bool m_dragEnter{false};
bool m_containsMouse{false};
bool m_raiseTemporarily{false};

View File

@ -281,6 +281,13 @@ Item {
}
//! View::VisibilityManager
Binding{
target: latteView && latteView.visibility ? latteView.visibility : null
property: "isShownFully"
when: latteView && latteView.visibility
value: myView.isShownFully
}
Binding{
target: latteView && latteView.visibility ? latteView.visibility : null
property: "strutsThickness"