[vlc-commits] qml: allow forcing color scheme on ControlBar

Prince Gupta git at videolan.org
Mon Feb 8 09:59:54 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jan  8 22:20:59 2021 +0530| [8f3ff6aa212029cc41fdd46b984b120077866bc5] | committer: Pierre Lamot

qml: allow forcing color scheme on ControlBar

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f3ff6aa212029cc41fdd46b984b120077866bc5
---

 modules/gui/qt/player/qml/ControlBar.qml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index 917f6e0c1e..3f42107636 100644
--- a/modules/gui/qt/player/qml/ControlBar.qml
+++ b/modules/gui/qt/player/qml/ControlBar.qml
@@ -33,6 +33,7 @@ Widgets.NavigableFocusScope {
 
     signal showTrackBar()
 
+    property VLCColors colors: VLCStyle.nightColors
     property bool autoHide: _lockAutoHide === 0 && !lockAutoHide
     property bool lockAutoHide: false
     property int  _lockAutoHide: 0 //count the number of element locking the autoHide
@@ -53,7 +54,7 @@ Widgets.NavigableFocusScope {
         RowLayout {
             Text {
                 text: player.time.toString()
-                color: VLCStyle.colors.playerFg
+                color: root.colors.playerFg
                 font.pixelSize: VLCStyle.fontSize_normal
                 font.bold: true
                 Layout.alignment: Qt.AlignLeft
@@ -68,7 +69,7 @@ Widgets.NavigableFocusScope {
                 text: (mainInterface.showRemainingTime && player.remainingTime.valid())
                       ? "-" + player.remainingTime.toString()
                       : player.length.toString()
-                color: VLCStyle.colors.playerFg
+                color: root.colors.playerFg
                 font.pixelSize: VLCStyle.fontSize_normal
                 font.bold: true
                 Layout.alignment: Qt.AlignRight
@@ -88,7 +89,7 @@ Widgets.NavigableFocusScope {
 
             parentWindow: g_root
 
-            colors: VLCStyle.nightColors
+            colors: root.colors
         }
 
         Item {
@@ -111,7 +112,7 @@ Widgets.NavigableFocusScope {
 
                 navigationUpItem: trackPositionSlider.enabled ? trackPositionSlider : root.navigationUpItem
 
-                colors: VLCStyle.nightColors
+                colors: root.colors
             }
         }
     }



More information about the vlc-commits mailing list