From 0e002567dc99ed7aef43f72b3547a07ae9f534b2 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 5 Jan 2021 20:09:49 +0200 Subject: [PATCH] drop LayoutsContainer.restoreZoomIsBlocked --Parabolic Host Ability is quite capable to handle this properly --- .../contents/ui/abilities/ParabolicEffect.qml | 3 +- .../privates/ParabolicEffectPrivate.qml | 37 ++++++++++++++++++- .../ui/layouts/abilities/AbilityGrid.qml | 19 ---------- .../ui/layouts/abilities/AbilityLayouts.qml | 4 -- .../abilities/types/ParabolicEffect.qml | 1 - containment/package/contents/ui/main.qml | 2 +- 6 files changed, 38 insertions(+), 28 deletions(-) diff --git a/containment/package/contents/ui/abilities/ParabolicEffect.qml b/containment/package/contents/ui/abilities/ParabolicEffect.qml index 2f8442c2e..77b03c3a5 100644 --- a/containment/package/contents/ui/abilities/ParabolicEffect.qml +++ b/containment/package/contents/ui/abilities/ParabolicEffect.qml @@ -30,8 +30,7 @@ Ability.ParabolicEffectPrivate { isEnabled: factor.zoom>1 && !root.inConfigureAppletsMode factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1 factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor) - restoreZoomIsBlocked: (view && view.contextMenuIsShown) - || (applets.parabolic.restoreZoomIsBlocked) + restoreZoomIsBlocked: restoreZoomIsBlockedFromApplet || (view && view.contextMenuIsShown) currentParabolicItem: view ? view.parabolic.currentItem : null } diff --git a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml index 7ebae0d5e..55023388b 100644 --- a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml +++ b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml @@ -30,12 +30,13 @@ AbilityHost.ParabolicEffect { id: parabolic property Item animations: null - property Item applets: null property Item debug: null + property Item layouts: null property QtObject view: null readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal + property bool restoreZoomIsBlockedFromApplet: false property int lastParabolicItemIndex: -1 Connections { @@ -78,6 +79,40 @@ AbilityHost.ParabolicEffect { } } + //! do not update during dragging/moving applets inConfigureAppletsMode + readonly property bool isBindingUpdateEnabled: !(root.dragOverlay && root.dragOverlay.pressed) + + Binding{ + target: parabolic + property: "restoreZoomIsBlockedFromApplet" + when: isBindingUpdateEnabled + value: { + var grid; + + for (var l=0; l<=2; ++l) { + if (l===0) { + grid = layouts.startLayout; + } else if (l===1) { + grid = layouts.mainLayout; + } else if (l===2) { + grid = layouts.endLayout; + } + + for (var i=0; i