[vlc-commits] qml: fix undefined sizing of the volume widget making it invisible
Pierre Lamot
git at videolan.org
Tue Jul 16 10:13:30 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Jun 18 16:08:50 2019 +0200| [7b4d23dcab5a9dd00311c7bf6336bace3eff9611] | committer: Jean-Baptiste Kempf
qml: fix undefined sizing of the volume widget making it invisible
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b4d23dcab5a9dd00311c7bf6336bace3eff9611
---
modules/gui/qt/qml/player/VolumeWidget.qml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/qml/player/VolumeWidget.qml b/modules/gui/qt/qml/player/VolumeWidget.qml
index 4ba213e5f1..d823eb23d8 100644
--- a/modules/gui/qt/qml/player/VolumeWidget.qml
+++ b/modules/gui/qt/qml/player/VolumeWidget.qml
@@ -81,10 +81,13 @@ FocusScope{
}
background: Rectangle {
+ id: sliderBg
x: volControl.leftPadding
y: volControl.topPadding + volControl.availableHeight / 2 - height / 2
implicitWidth: parent.width
implicitHeight: 4 * VLCStyle.scale
+ height: implicitHeight
+ width: volControl.availableWidth
radius: 4 * VLCStyle.scale
color: VLCStyle.colors.volsliderbg
@@ -114,14 +117,14 @@ FocusScope{
}
Rectangle {
id: filled
- width: volControl.visualPosition * parent.width
+ width: volControl.visualPosition * sliderBg.width
height: parent.height
radius: 4 * VLCStyle.scale
color: VLCStyle.colors.buttonText
layer.enabled: (volControl.hovered || volControl.activeFocus)
layer.effect: LinearGradient {
start: Qt.point(0, 0)
- end: Qt.point(volControl.width, 0)
+ end: Qt.point(sliderBg.width, 0)
gradient: Gradient {
GradientStop { position: 0.30; color: VLCStyle.colors.volbelowmid }
GradientStop { position: 0.80; color: VLCStyle.colors.volabovemid }
More information about the vlc-commits
mailing list