[vlc-devel] [PATCH 10/21] qml: allow forcing colors of VolumeWidget widget
Pierre Lamot
pierre at videolabs.io
Wed Aug 7 15:52:16 CEST 2019
---
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 d823eb23d8..2a13acda34 100644
--- a/modules/gui/qt/qml/player/VolumeWidget.qml
+++ b/modules/gui/qt/qml/player/VolumeWidget.qml
@@ -32,6 +32,8 @@ FocusScope{
property bool acceptFocus: true
+ property color color: VLCStyle.colors.buttonText
+
RowLayout{
id: volumeWidget
Utils.IconToolButton{
@@ -46,6 +48,7 @@ FocusScope{
VLCIcons.volume_medium
else
VLCIcons.volume_high
+ color: widgetfscope.color
onClicked: player.muted = !player.muted
KeyNavigation.right: volControl
}
@@ -70,7 +73,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
@@ -120,7 +123,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)
@@ -139,7 +142,7 @@ FocusScope{
width: 1 * VLCStyle.scale
height: parent.height
radius: 2 * VLCStyle.scale
- color: VLCStyle.colors.buttonText
+ color: widgetfscope.color
}
}
--
2.17.1
More information about the vlc-devel
mailing list