From fe4704e355904676e2cc84a16c124d71d9249d82 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 18 May 2020 16:06:46 +0300 Subject: [PATCH] block par.effect for applet popups --- app/view/tasksmodel.h | 6 ------ .../package/contents/ui/abilities/ParabolicEffect.qml | 4 +++- containment/package/contents/ui/applet/ItemWrapper.qml | 2 +- .../package/contents/ui/layouts/abilities/AbilityGrid.qml | 2 +- plasmoid/package/contents/ui/main.qml | 2 +- plasmoid/package/contents/ui/task/Wrapper.qml | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/view/tasksmodel.h b/app/view/tasksmodel.h index 9fc82b311..b4fd2678b 100644 --- a/app/view/tasksmodel.h +++ b/app/view/tasksmodel.h @@ -36,12 +36,6 @@ public: QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; QHash roleNames() const override; - /*void appendSample(Sample * sample) - { - beginInsertRows(QModelIndex(), rowCount(), rowCount()); - mSamples << sample; - endInsertRows(); - }*/ void addTask(QObject *plasmoid); void removeTask(QObject *plasmoid); diff --git a/containment/package/contents/ui/abilities/ParabolicEffect.qml b/containment/package/contents/ui/abilities/ParabolicEffect.qml index a08da6fe6..65029f4d7 100644 --- a/containment/package/contents/ui/abilities/ParabolicEffect.qml +++ b/containment/package/contents/ui/abilities/ParabolicEffect.qml @@ -29,5 +29,7 @@ import "./privates" as Ability Ability.ParabolicEffectPrivate { factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1 factor.maxZoom: Math.max(factor.zoom, applets.require.maxInnerZoomFactor) - restoreZoomIsBlocked: (view && view.contextMenuIsShown) || (applets.parabolic.restoreZoomIsBlocked) + restoreZoomIsBlocked: (view && view.contextMenuIsShown) + || (view && view.extendedInterface.hasExpandedApplet) + || (applets.parabolic.restoreZoomIsBlocked) } diff --git a/containment/package/contents/ui/applet/ItemWrapper.qml b/containment/package/contents/ui/applet/ItemWrapper.qml index ab92b6902..0b7298fce 100644 --- a/containment/package/contents/ui/applet/ItemWrapper.qml +++ b/containment/package/contents/ui/applet/ItemWrapper.qml @@ -596,7 +596,7 @@ Item{ } function calculateScales( currentMousePosition ){ - if (parabolic.factor.zoom===1) { + if (parabolic.factor.zoom===1 || parabolic.restoreZoomIsBlocked) { return; } diff --git a/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml b/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml index 38df1d08b..42b12120d 100644 --- a/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml +++ b/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml @@ -37,7 +37,7 @@ AbilityGridPrivate { if (appletItem && appletItem.communicator && appletItem.communicator.parabolicEffectIsSupported - && appletItem.communicator.bridge.parabolic.client.restoreZoomIsBlocked) { + && appletItem.communicator.bridge.parabolic.client.local.restoreZoomIsBlocked) { return true; } } diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 314ff6923..ee0865ee1 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -962,7 +962,7 @@ Item { Ability.ParabolicEffect { id: _parabolic bridge: latteBridge - restoreZoomIsBlocked: root.contextMenu || windowsPreviewDlg.visible + local.restoreZoomIsBlocked: root.contextMenu || windowsPreviewDlg.visible } AppletAbility.Requirements{ diff --git a/plasmoid/package/contents/ui/task/Wrapper.qml b/plasmoid/package/contents/ui/task/Wrapper.qml index 4ecd9b9b9..abcc2e1b2 100644 --- a/plasmoid/package/contents/ui/task/Wrapper.qml +++ b/plasmoid/package/contents/ui/task/Wrapper.qml @@ -157,7 +157,7 @@ Item{ } function calculateScales( currentMousePosition ){ - if (taskItem.parabolic.factor.zoom===1) { + if (taskItem.parabolic.factor.zoom===1 || parabolic.restoreZoomIsBlocked) { return; }