Un inicio

This commit is contained in:
Ruben Garcalia
2026-08-07 04:35:28 +02:00
parent 2e80cb5c01
commit 4d1232821a
13 changed files with 519 additions and 0 deletions

87
ui/FadingFeedback.qml Normal file
View File

@@ -0,0 +1,87 @@
pragma ComponentBehavior: Bound
import QtQuick
Item {
id: root
anchors.centerIn: parent
width: 100
height: width
opacity: 0
function trigger() {
hideTimer.stop();
root.state = "hidden";
root.state = "visible";
hideTimer.start();
}
function get_opacity() {
return root.opacity
}
function hide() {
root.opacity = 0;
root.state = "hidden";
}
// IconImage {
// id: innerIcon
// anchors.fill: parent
// source: videoPlayer.playbackState === MediaPlayer.PlayingState ? "qrc:/App/ui/icons/play.svg" : "qrc:/App/ui/icons/pause.svg"
// color: "white"
// fillMode: Image.PreserveAspectFit
//
// layer.enabled: true
// layer.effect: MultiEffect {
// shadowEnabled: true
// shadowColor: "black"
// shadowBlur: 0.5
// }
// }
states: [
State {
name: "visible"
PropertyChanges {
root.opacity: 1
}
},
State {
name: "hidden"
PropertyChanges {
root.opacity: 0
}
}
]
transitions: [
Transition {
from: "hidden"
to: "visible"
NumberAnimation {
properties: "opacity"
duration: 150
easing.type: Easing.OutCubic
}
},
Transition {
from: "visible"
to: "hidden"
NumberAnimation {
properties: "opacity"
duration: 400
easing.type: Easing.InOutCubic
}
}
]
Timer {
id: hideTimer
interval: 800
repeat: false
onTriggered: {
root.state = "hidden";
}
}
}