mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
DesktopWidget: MediaPlayer add animation and a persistent position for play/pause
This commit is contained in:
@@ -250,7 +250,13 @@ DraggableDesktopWidget {
|
||||
Layout.alignment: root.showAlbumArt ? Qt.AlignVCenter : Qt.AlignCenter
|
||||
|
||||
NIconButton {
|
||||
visible: showPrev
|
||||
opacity: showPrev ? 1 : 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Style.animationSlow
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
baseSize: Math.round(32 * widgetScale)
|
||||
icon: "media-prev"
|
||||
enabled: hasPlayer && MediaService.canGoPrevious
|
||||
@@ -280,7 +286,13 @@ DraggableDesktopWidget {
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
visible: showNext
|
||||
opacity: showNext ? 1 : 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Style.animationSlow
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
baseSize: Math.round(32 * widgetScale)
|
||||
icon: "media-next"
|
||||
enabled: hasPlayer && MediaService.canGoNext
|
||||
|
||||
Reference in New Issue
Block a user