[vlc-commits] [Git][videolan/vlc][master] qml: fix and animate PlayCover hover color
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Oct 13 15:32:24 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
28184b37 by Leon Vitanos at 2026-10-13T15:53:13+02:00
qml: fix and animate PlayCover hover color
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/PlayCover.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/PlayCover.qml
=====================================
@@ -35,6 +35,8 @@ Item {
// Maybe we could crank this to 1.1.
scale: (hoverHandler.hovered && !tapHandler.pressed) ? 1.05 : 1.0
+ property real _hoverProgress: hoverHandler.hovered ? 1.0 : 0.0
+
activeFocusOnTab: false
signal tapped(var point)
@@ -57,6 +59,14 @@ Item {
}
}
+ Behavior on _hoverProgress {
+ NumberAnimation {
+ duration: VLCStyle.duration_short
+
+ easing.type: Easing.InOutSine
+ }
+ }
+
// Children
TapHandler {
@@ -92,7 +102,11 @@ Item {
text: VLCIcons.play_filled
- color: (root.hovered) ? theme.accent : "black"
+ color: {
+ const accent = theme.accent
+ const t = root._hoverProgress
+ return Qt.rgba(accent.r * t, accent.g * t, accent.b * t, 1)
+ }
font.pixelSize: Math.round(parent.width / 2)
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/28184b3711af3585993cefb22f64740c3696163c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/28184b3711af3585993cefb22f64740c3696163c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list