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.
This commit is contained in:
Nate Graham 2022-09-06 15:34:44 -06:00
parent 31d1f885ce
commit f73cb8f1e5

View file

@ -98,6 +98,14 @@ Item {
Layout.topMargin: PlasmaCore.Units.gridUnit Layout.topMargin: PlasmaCore.Units.gridUnit
Layout.preferredWidth: Math.min(parent.width, 20 * PlasmaCore.Units.gridUnit) Layout.preferredWidth: Math.min(parent.width, 20 * PlasmaCore.Units.gridUnit)
focus: false 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 // 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 // We can't use activeFocus because is not reliable on qml effects
onTextChanged: { onTextChanged: {