VolumeOSD: Increase animation duration and bugfix for audio applet page

This commit is contained in:
Micah Stanley 2024-10-27 18:26:13 +00:00 committed by Devin Lin
parent 07836309c2
commit f9630ba178
3 changed files with 17 additions and 13 deletions

View file

@ -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
}
}
}

View file

@ -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 {

View file

@ -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 {