From 397e1324e9a955eed5d2404232537561932e5bf8 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 19 Jan 2021 21:14:09 +0200 Subject: [PATCH] update name to view.inRelocationAnimation --- app/view/positioner.cpp | 24 +++++++++---------- app/view/positioner.h | 10 ++++---- app/view/visibilitymanager.cpp | 6 ++--- .../package/contents/ui/VisibilityManager.qml | 6 ++--- .../contents/ui/layouts/LayoutsContainer.qml | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/view/positioner.cpp b/app/view/positioner.cpp index 3e88edce5..0cd9766ea 100644 --- a/app/view/positioner.cpp +++ b/app/view/positioner.cpp @@ -115,12 +115,12 @@ void Positioner::init() //! connections connect(this, &Positioner::screenGeometryChanged, this, &Positioner::syncGeometry); - connect(this, &Positioner::hideDockDuringLocationChangeStarted, this, &Positioner::updateInLocationAnimation); - connect(this, &Positioner::hideDockDuringScreenChangeStarted, this, &Positioner::updateInLocationAnimation); - connect(this, &Positioner::hideDockDuringMovingToLayoutStarted, this, &Positioner::updateInLocationAnimation); - connect(this, &Positioner::showDockAfterLocationChangeFinished, this, &Positioner::updateInLocationAnimation); - connect(this, &Positioner::showDockAfterScreenChangeFinished, this, &Positioner::updateInLocationAnimation); - connect(this, &Positioner::showDockAfterMovingToLayoutFinished, this, &Positioner::updateInLocationAnimation); + connect(this, &Positioner::hideDockDuringLocationChangeStarted, this, &Positioner::updateInRelocationAnimation); + connect(this, &Positioner::hideDockDuringScreenChangeStarted, this, &Positioner::updateInRelocationAnimation); + connect(this, &Positioner::hideDockDuringMovingToLayoutStarted, this, &Positioner::updateInRelocationAnimation); + connect(this, &Positioner::showDockAfterLocationChangeFinished, this, &Positioner::updateInRelocationAnimation); + connect(this, &Positioner::showDockAfterScreenChangeFinished, this, &Positioner::updateInRelocationAnimation); + connect(this, &Positioner::showDockAfterMovingToLayoutFinished, this, &Positioner::updateInRelocationAnimation); connect(this, &Positioner::showDockAfterLocationChangeFinished, this, &Positioner::syncLatteViews); connect(this, &Positioner::showDockAfterScreenChangeFinished, this, &Positioner::syncLatteViews); @@ -968,7 +968,7 @@ bool Positioner::inLayoutUnloading() return m_inLayoutUnloading; } -bool Positioner::inLocationAnimation() +bool Positioner::inRelocationAnimation() { return ((m_goToLocation != Plasma::Types::Floating) || (m_moveToLayout != "") || m_goToScreen); } @@ -1023,16 +1023,16 @@ void Positioner::setIsStickedOnBottomEdge(bool sticked) emit isStickedOnBottomEdgeChanged(); } -void Positioner::updateInLocationAnimation() +void Positioner::updateInRelocationAnimation() { - bool inLocationAnimation = ((m_goToLocation != Plasma::Types::Floating) || (m_moveToLayout != "") || m_goToScreen); + bool inRelocationAnimation = ((m_goToLocation != Plasma::Types::Floating) || (m_moveToLayout != "") || m_goToScreen); - if (m_inLocationAnimation == inLocationAnimation) { + if (m_inRelocationAnimation == inRelocationAnimation) { return; } - m_inLocationAnimation = inLocationAnimation; - emit inLocationAnimationChanged(); + m_inRelocationAnimation = inRelocationAnimation; + emit inRelocationAnimationChanged(); } void Positioner::hideDockDuringLocationChange(int goToLocation) diff --git a/app/view/positioner.h b/app/view/positioner.h index d0f2ee983..7697311b4 100644 --- a/app/view/positioner.h +++ b/app/view/positioner.h @@ -48,7 +48,7 @@ class Positioner: public QObject { Q_OBJECT - Q_PROPERTY(bool inLocationAnimation READ inLocationAnimation NOTIFY inLocationAnimationChanged) + Q_PROPERTY(bool inRelocationAnimation READ inRelocationAnimation NOTIFY inRelocationAnimationChanged) Q_PROPERTY(bool inSlideAnimation READ inSlideAnimation WRITE setInSlideAnimation NOTIFY inSlideAnimationChanged) Q_PROPERTY(bool isStickedOnTopEdge READ isStickedOnTopEdge WRITE setIsStickedOnTopEdge NOTIFY isStickedOnTopEdgeChanged) @@ -70,7 +70,7 @@ public: void setSlideOffset(int offset); bool inLayoutUnloading(); - bool inLocationAnimation(); + bool inRelocationAnimation(); bool inSlideAnimation() const; void setInSlideAnimation(bool active); @@ -128,7 +128,7 @@ signals: void showDockAfterMovingToLayoutFinished(); void onHideWindowsForSlidingOut(); - void inLocationAnimationChanged(); + void inRelocationAnimationChanged(); void inSlideAnimationChanged(); void isStickedOnTopEdgeChanged(); void isStickedOnBottomEdgeChanged(); @@ -138,7 +138,7 @@ private slots: void onCurrentLayoutIsSwitching(const QString &layoutName); void validateDockGeometry(); - void updateInLocationAnimation(); + void updateInRelocationAnimation(); void syncLatteViews(); void updateContainmentScreen(); @@ -160,7 +160,7 @@ private: private: bool m_inDelete{false}; bool m_inLayoutUnloading{false}; - bool m_inLocationAnimation{false}; + bool m_inRelocationAnimation{false}; bool m_inSlideAnimation{false}; bool m_isStickedOnTopEdge{false}; diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index a7c110796..be6b164d7 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -387,7 +387,7 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode) void VisibilityManager::updateStrutsBasedOnLayoutsAndActivities(bool forceUpdate) { bool inMultipleLayoutsAndCurrent = (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::MultipleLayouts - && m_latteView->layout() && !m_latteView->positioner()->inLocationAnimation() + && m_latteView->layout() && !m_latteView->positioner()->inRelocationAnimation() && m_latteView->layout()->isCurrent()); if (m_strutsThickness>0 && (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::SingleLayout || inMultipleLayoutsAndCurrent)) { @@ -640,7 +640,7 @@ void VisibilityManager::updateGhostWindowState() if (supportsKWinEdges()) { bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::SingleLayout || (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::MultipleLayouts - && m_latteView->layout() && !m_latteView->positioner()->inLocationAnimation() + && m_latteView->layout() && !m_latteView->positioner()->inRelocationAnimation() && m_latteView->layout()->isCurrent())); if (inCurrentLayout) { @@ -1062,7 +1062,7 @@ void VisibilityManager::createEdgeGhostWindow() this, [&]() { bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::SingleLayout || (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::MultipleLayouts - && m_latteView->layout() && !m_latteView->positioner()->inLocationAnimation() + && m_latteView->layout() && !m_latteView->positioner()->inRelocationAnimation() && m_latteView->layout()->isCurrent())); if (m_edgeGhostWindow) { diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index 5249ca611..92d45b336 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -48,12 +48,12 @@ Item{ property bool inForcedHiding: false //is used when the docks are forced in hiding e.g. when changing layouts - property bool inLocationAnimation: latteView && latteView.positioner && latteView.positioner.inLocationAnimation + property bool inRelocationAnimation: latteView && latteView.positioner && latteView.positioner.inRelocationAnimation property bool inScreenEdgeInternalWindowSliding: root.behaveAsDockWithMask && hideThickScreenGap property bool inSlidingIn: false //necessary because of its init structure property alias inSlidingOut: slidingAnimationAutoHiddenOut.running property bool inRelocationHiding: false - readonly property bool inSliding: inSlidingIn || inSlidingOut || inRelocationHiding || inScreenEdgeInternalWindowSliding || inLocationAnimation + readonly property bool inSliding: inSlidingIn || inSlidingOut || inRelocationHiding || inScreenEdgeInternalWindowSliding || inRelocationAnimation readonly property bool isSinkedEventEnabled: !(parabolic.isEnabled && (animations.needBothAxis.count>0 || animations.needLength.count>0)) && !inSlidingIn @@ -738,7 +738,7 @@ Item{ } function init() { - if (manager.inLocationAnimation || !latteView.visibility.blockHiding) { + if (manager.inRelocationAnimation || !latteView.visibility.blockHiding) { start(); } } diff --git a/containment/package/contents/ui/layouts/LayoutsContainer.qml b/containment/package/contents/ui/layouts/LayoutsContainer.qml index 5d893c9dd..9f21a668b 100644 --- a/containment/package/contents/ui/layouts/LayoutsContainer.qml +++ b/containment/package/contents/ui/layouts/LayoutsContainer.qml @@ -51,7 +51,7 @@ Item{ Binding { target: layoutsContainer property: "x" - when: !visibilityManager.inLocationAnimation + when: !visibilityManager.inRelocationAnimation value: { if (root.behaveAsPlasmaPanel) { return 0; @@ -84,7 +84,7 @@ Item{ Binding{ target: layoutsContainer property: "y" - when: !visibilityManager.inLocationAnimation + when: !visibilityManager.inRelocationAnimation value: { if (root.behaveAsPlasmaPanel) { return 0;