[vlc-commits] qml: allow forcing colors of VolumeWidget widget
Pierre Lamot
git at videolan.org
Thu Aug 29 10:44:48 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Aug 2 11:03:22 2019 +0200| [7dec0d08f9ed68ddbe08cf0c9b69267f882ad27f] | committer: Jean-Baptiste Kempf
qml: allow forcing colors of VolumeWidget widget
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7dec0d08f9ed68ddbe08cf0c9b69267f882ad27f
---
modules/gui/qt/qml/player/VolumeWidget.qml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/qml/player/VolumeWidget.qml b/modules/gui/qt/qml/player/VolumeWidget.qml
index adbf8bfde5..a4340e1236 100644
--- a/modules/gui/qt/qml/player/VolumeWidget.qml
+++ b/modules/gui/qt/qml/player/VolumeWidget.qml
@@ -35,6 +35,8 @@ FocusScope{
property bool acceptFocus: true
Component.onCompleted: paintOnly = false
+ property color color: VLCStyle.colors.buttonText
+
RowLayout{
id: volumeWidget
Utils.IconToolButton{
@@ -50,6 +52,7 @@ FocusScope{
VLCIcons.volume_medium
else
VLCIcons.volume_high
+ color: widgetfscope.color
onClicked: player.muted = !player.muted
KeyNavigation.right: volControl
}
@@ -74,7 +77,7 @@ FocusScope{
Keys.onRightPressed: widgetfscope.KeyNavigation.right.forceActiveFocus()
Keys.onLeftPressed: widgetfscope.KeyNavigation.left.forceActiveFocus()
- property color sliderColor: (volControl.position > fullvolpos) ? VLCStyle.colors.volmax : VLCStyle.colors.buttonText
+ property color sliderColor: (volControl.position > fullvolpos) ? VLCStyle.colors.volmax : widgetfscope.color
property int maxvol: 125
property double fullvolpos: 100 / maxvol
property double maxvolpos: maxvol / 100
@@ -124,7 +127,7 @@ FocusScope{
width: volControl.visualPosition * sliderBg.width
height: parent.height
radius: 4 * VLCStyle.scale
- color: VLCStyle.colors.buttonText
+ color: widgetfscope.color
layer.enabled: (volControl.hovered || volControl.activeFocus)
layer.effect: LinearGradient {
start: Qt.point(0, 0)
@@ -143,7 +146,7 @@ FocusScope{
width: 1 * VLCStyle.scale
height: parent.height
radius: 2 * VLCStyle.scale
- color: VLCStyle.colors.buttonText
+ color: widgetfscope.color
}
}
More information about the vlc-commits
mailing list