[vlc-commits] qml: force the color of the widget in the controlbar
Pierre Lamot
git at videolan.org
Thu Aug 29 10:44:57 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Aug 2 11:19:25 2019 +0200| [7b7c9413277f9496a488a007e2cd75ec4e34dbc3] | committer: Jean-Baptiste Kempf
qml: force the color of the widget in the controlbar
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b7c9413277f9496a488a007e2cd75ec4e34dbc3
---
modules/gui/qt/qml/player/ControlBar.qml | 1 +
modules/gui/qt/qml/player/PlayerButtonsLayout.qml | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/modules/gui/qt/qml/player/ControlBar.qml b/modules/gui/qt/qml/player/ControlBar.qml
index 967e87ceb5..9fe836c6a8 100644
--- a/modules/gui/qt/qml/player/ControlBar.qml
+++ b/modules/gui/qt/qml/player/ControlBar.qml
@@ -122,6 +122,7 @@ Utils.NavigableFocusScope {
focus: true
anchors.fill: parent
model: playerControlBarModel
+ forceColors: true
}
}
}
diff --git a/modules/gui/qt/qml/player/PlayerButtonsLayout.qml b/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
index 04f2a676f5..fb410732cf 100644
--- a/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
+++ b/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
@@ -31,6 +31,7 @@ RowLayout{
property bool _focusGiven: false
property alias model: buttonsRepeater.model
property var defaultSize: VLCStyle.icon_medium
+ property bool forceColors: false
Repeater{
id: buttonsRepeater
@@ -54,6 +55,16 @@ RowLayout{
while(buttonindex > 0 && !(buttonrow.children[buttonindex-1].item.acceptFocus))
buttonindex = buttonindex-1
+ //force buttons color
+ if (buttonrow.forceColors) {
+ if ( buttonloader.item.color )
+ buttonloader.item.color = VLCStyle.colors.playerFg
+ if ( buttonloader.item.bgColor )
+ buttonloader.item.bgColor = VLCStyle.colors.setColorAlpha(VLCStyle.colors.playerBg, 0.8)
+ if ( buttonloader.item.borderColor )
+ buttonloader.item.borderColor = VLCStyle.colors.playerBorder
+ }
+
if (buttonindex > 0)
buttonloader.item.KeyNavigation.left = buttonrow.children[buttonindex-1].item
}
More information about the vlc-commits
mailing list