From 9615c7362beab72f66bfa81142d36a9530c78d8a Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 4 Mar 2019 19:18:35 +0200 Subject: [PATCH] enable Blur in LiveMode --- containment/package/contents/ui/PanelBox.qml | 10 +++++++--- containment/package/contents/ui/VisibilityManager.qml | 2 +- containment/package/contents/ui/editmode/Visual.qml | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/containment/package/contents/ui/PanelBox.qml b/containment/package/contents/ui/PanelBox.qml index 68602d171..8e31d0de0 100644 --- a/containment/package/contents/ui/PanelBox.qml +++ b/containment/package/contents/ui/PanelBox.qml @@ -295,6 +295,7 @@ Item{ Image{ id: backTiler anchors.fill: parent + visible: false fillMode: Image.Tile source: hasBackground ? latteView.managedLayout.background : "../icons/"+editModeVisual.layoutColor+"print.jpg" @@ -305,17 +306,20 @@ Item{ ShaderEffectSource { id: effectSource + anchors.fill: backTiler + visible: false sourceItem: backTiler - anchors.fill: backTiler sourceRect: Qt.rect(0,0, width, height) } FastBlur{ id: blur anchors.fill: effectSource + opacity: editModeVisual.opacity * 1.5 + source: effectSource - radius: 35 + radius: 50 } } } @@ -395,7 +399,7 @@ Item{ } function updateEffectsArea(){ - if (!latteView || root.editMode) + if (!latteView) return; var rootGeometry = mapToItem(root, 0, 0); diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index efe3cb750..5fc7f58da 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -150,7 +150,7 @@ Item{ target: latteView && latteView.effects ? latteView.effects : null property: "drawEffects" when: latteView && latteView.effects - value: Latte.WindowSystem.compositingActive && !editModeVisual.inEditMode && + value: Latte.WindowSystem.compositingActive && (((root.blurEnabled && root.useThemePanel) || (root.blurEnabled && root.forceSolidPanel && Latte.WindowSystem.compositingActive)) && (!root.inStartup || inForceHiding || inTempHiding)) diff --git a/containment/package/contents/ui/editmode/Visual.qml b/containment/package/contents/ui/editmode/Visual.qml index 4af38f033..3c01047ea 100644 --- a/containment/package/contents/ui/editmode/Visual.qml +++ b/containment/package/contents/ui/editmode/Visual.qml @@ -166,8 +166,9 @@ Item{ MouseArea { id: editBackMouseArea - anchors.fill: parent + visible: editModeVisual.editAnimationEnded + property bool wheelIsBlocked: false; readonly property double opacityStep: 0.1 @@ -245,8 +246,10 @@ Item{ } function updateEffectsArea(){ - if (!latteView || state !== "edit" || !editAnimationEnded) + if (Latte.WindowSystem.compositingActive || + !latteView || state !== "edit" || !editAnimationEnded) { return; + } var rootGeometry = mapToItem(root, 0, 0);