From f73cb8f1e56fd86fa715f74476eed8c1004f6f62 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 6 Sep 2022 15:34:44 -0600 Subject: [PATCH] effects/windowview: fade Searchfield in and out just like background The Overview effect manipulates the opacity of the desktop bar and search field along with that of the blurred background so that they all fade in and out in sync, but Window View does not, leading to a discrepancy between them that looks weird. --- src/effects/windowview/qml/main.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/effects/windowview/qml/main.qml b/src/effects/windowview/qml/main.qml index 89be6d6567..82e61c3c70 100644 --- a/src/effects/windowview/qml/main.qml +++ b/src/effects/windowview/qml/main.qml @@ -98,6 +98,14 @@ Item { Layout.topMargin: PlasmaCore.Units.gridUnit Layout.preferredWidth: Math.min(parent.width, 20 * PlasmaCore.Units.gridUnit) focus: false + + // Otherwise it's always 100% opaque even while the blurry desktop background's + // opacity is changing, which looks weird and is different from what Overview does. + opacity: container.organized ? 1 : 0 + Behavior on opacity { + OpacityAnimator { duration: container.effect.animationDuration; easing.type: Easing.OutCubic } + } + // Binding loops will be avoided from the fact that setting the text to the same won't emit textChanged // We can't use activeFocus because is not reliable on qml effects onTextChanged: {