[vlc-devel] [PATCH 03/33] qml: allow forcing color scheme on ControlBar

Prince Gupta guptaprince8832 at gmail.com
Wed Feb 3 10:56:19 UTC 2021


---
 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
             }
         }
     }
-- 
2.25.1



More information about the vlc-devel mailing list