vlc | branch: master | Fatih Uzunoglu <[email protected]> | Fri Jan 8 00:37:03 2021 +0300| [6a7dc7d03645b73a612607138e03cc9762507fd5] | committer: Pierre Lamot
qml: allow forcing theme for VolumeWidget Signed-off-by: Pierre Lamot <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a7dc7d03645b73a612607138e03cc9762507fd5 --- modules/gui/qt/player/qml/VolumeWidget.qml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt/player/qml/VolumeWidget.qml b/modules/gui/qt/player/qml/VolumeWidget.qml index 33bef7669a..b7183a6a64 100644 --- a/modules/gui/qt/player/qml/VolumeWidget.qml +++ b/modules/gui/qt/player/qml/VolumeWidget.qml @@ -36,7 +36,7 @@ FocusScope{ property bool acceptFocus: true Component.onCompleted: paintOnly = false - property color color: VLCStyle.colors.buttonText + property color color: colors.buttonText property alias parentWindow: volumeTooltip.parentWindow @@ -45,6 +45,8 @@ FocusScope{ property var navigationLeft: null property var navigationRight: null + property VLCColors colors: VLCStyle.colors + RowLayout{ id: volumeWidget Widgets.IconToolButton{ @@ -140,7 +142,7 @@ FocusScope{ navigationLeft() } - property color sliderColor: (volControl.position > fullvolpos) ? VLCStyle.colors.volmax : widgetfscope.color + property color sliderColor: (volControl.position > fullvolpos) ? colors.volmax : widgetfscope.color property int maxvol: 125 property double fullvolpos: 100 / maxvol property double maxvolpos: maxvol / 100 @@ -160,6 +162,8 @@ FocusScope{ mouseArea: sliderMouseArea xPos: (handle.x + handle.width / 2) + + colors: widgetfscope.colors } background: Rectangle { @@ -171,7 +175,7 @@ FocusScope{ height: implicitHeight width: volControl.availableWidth radius: VLCStyle.dp(4, VLCStyle.scale) - color: VLCStyle.colors.volsliderbg + color: colors.volsliderbg MouseArea { id: sliderMouseArea @@ -226,10 +230,10 @@ FocusScope{ start: Qt.point(0, 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 } - GradientStop { position: 0.85; color: VLCStyle.colors.volhigh } - GradientStop { position: 1.00; color: VLCStyle.colors.volmax } + GradientStop { position: 0.30; color: colors.volbelowmid } + GradientStop { position: 0.80; color: colors.volabovemid } + GradientStop { position: 0.85; color: colors.volhigh } + GradientStop { position: 1.00; color: colors.volmax } } } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
