[vlc-commits] [Git][videolan/vlc][master] qml: get rid of the second rectangle and use gradient instead in `VideoProgressBar`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Feb 18 06:52:51 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
d962a908 by Fatih Uzunoglu at 2025-02-18T06:38:09+00:00
qml: get rid of the second rectangle and use gradient instead in `VideoProgressBar`
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/VideoProgressBar.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/VideoProgressBar.qml
=====================================
@@ -37,6 +37,7 @@ Item {
}
Rectangle {
+ id: rectangle
anchors.left: parent.left
anchors.right: parent.right
@@ -49,25 +50,10 @@ Item {
color: "white"
radius: progressBar.radius
- //use clipping again to delimit the viewed part as we want the accent section to follow the given as well
- Item {
- clip: true
-
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: progressBar.value * parent.width
-
- Rectangle {
- width: progressBar.width
-
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.left: parent.left
-
- color: theme.fg.primary
- radius: progressBar.radius
- }
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: progressBar.value; color: theme.fg.primary }
+ GradientStop { position: progressBar.value + (1. / rectangle.width); color: rectangle.color }
}
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d962a9085863e5f8a72ff19d4dfee1742430e1a0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d962a9085863e5f8a72ff19d4dfee1742430e1a0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list