From f9630ba178e6a3bfd26e1139ffdcf35d1694c5f2 Mon Sep 17 00:00:00 2001 From: Micah Stanley Date: Sun, 27 Oct 2024 18:26:13 +0000 Subject: [PATCH] VolumeOSD: Increase animation duration and bugfix for audio applet page --- .../mobileshell/qml/volumeosd/ListItemBase.qml | 14 +++++++++----- .../qml/volumeosd/VolumeChangedPopup.qml | 6 +++--- components/mobileshell/qml/volumeosd/VolumeOSD.qml | 10 +++++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/components/mobileshell/qml/volumeosd/ListItemBase.qml b/components/mobileshell/qml/volumeosd/ListItemBase.qml index 8bb14924..f4dd3b55 100644 --- a/components/mobileshell/qml/volumeosd/ListItemBase.qml +++ b/components/mobileshell/qml/volumeosd/ListItemBase.qml @@ -21,16 +21,21 @@ import org.kde.plasma.private.volume 0.1 import "icon.js" as Icon // adapted from https://invent.kde.org/plasma/plasma-pa/-/blob/master/applet/contents/ui/ListItemBase.qml -Controls.ItemDelegate { +Controls.Control { id: baseItem property string label property alias listIcon: clientIcon.source property string type // sink, source, source-output - onClicked: { - if (selectButton.visible) { - model.PulseObject.default = true; + MouseArea { + id: clickArea + anchors.fill: parent + z: -1 + onClicked: { + if (selectButton.visible) { + model.PulseObject.default = true; + } } } @@ -119,7 +124,6 @@ Controls.ItemDelegate { return sourceView.model; } } - onVisibleChanged: window.suppressActiveClose = visible } } } diff --git a/components/mobileshell/qml/volumeosd/VolumeChangedPopup.qml b/components/mobileshell/qml/volumeosd/VolumeChangedPopup.qml index 5feaa75f..d908a03f 100644 --- a/components/mobileshell/qml/volumeosd/VolumeChangedPopup.qml +++ b/components/mobileshell/qml/volumeosd/VolumeChangedPopup.qml @@ -51,10 +51,10 @@ Window { } function open() { + window.visible = true; cards.state = "open"; // set window input transparency to accept touches ShellUtil.setInputTransparent(window, false); - window.visible = true; } function close() { @@ -116,10 +116,10 @@ Window { SequentialAnimation { ParallelAnimation { PropertyAnimation { - properties: "offset"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "offset"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } PropertyAnimation { - properties: "scale"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "scale"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } } ScriptAction { diff --git a/components/mobileshell/qml/volumeosd/VolumeOSD.qml b/components/mobileshell/qml/volumeosd/VolumeOSD.qml index 8f97d103..c4294f17 100644 --- a/components/mobileshell/qml/volumeosd/VolumeOSD.qml +++ b/components/mobileshell/qml/volumeosd/VolumeOSD.qml @@ -48,10 +48,10 @@ Window { } function open() { + window.visible = true; flickable.state = "open"; // set window input transparency to accept touches ShellUtil.setInputTransparent(window, false); - window.visible = true; } function close() { @@ -115,16 +115,16 @@ Window { SequentialAnimation { ParallelAnimation { PropertyAnimation { - properties: "offset"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "offset"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } PropertyAnimation { - properties: "scale"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "scale"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } PropertyAnimation { - properties: "opacity"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "opacity"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } PropertyAnimation { - properties: "color"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration + properties: "color"; easing.type: Easing.OutExpo; duration: Kirigami.Units.veryLongDuration * 1.25 } } ScriptAction {