Skip to content
Snippets Groups Projects
Commit d962a908 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qml: get rid of the second rectangle and use gradient instead in `VideoProgressBar`

parent ca8a1dd2
No related branches found
No related tags found
1 merge request!6860qml: optimize `VideoProgressBar` by getting rid of the second rectangle
Pipeline #567781 passed with stage
in 11 minutes and 13 seconds
......@@ -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 }
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment