[vlc-commits] qml: make PlaylistToolbar VLCColors overridable

Fatih Uzunoglu git at videolan.org
Fri Jul 24 11:46:01 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Mon Jul  6 22:00:13 2020 +0300| [6c03c5b2d1426b6efe805555a912564d9f70ab5c] | committer: Pierre Lamot

qml: make PlaylistToolbar VLCColors overridable

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

 modules/gui/qt/playlist/qml/PlaylistToolbar.qml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/playlist/qml/PlaylistToolbar.qml b/modules/gui/qt/playlist/qml/PlaylistToolbar.qml
index c35af67325..408f692f7f 100644
--- a/modules/gui/qt/playlist/qml/PlaylistToolbar.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistToolbar.qml
@@ -32,9 +32,11 @@ Widgets.NavigableFocusScope {
     property int rightPadding: 0
     height: VLCStyle.heightBar_normal
 
+    property VLCColors _colors: VLCStyle.colors
+
     Rectangle {
         anchors.fill: parent
-        color: VLCStyle.colors.banner
+        color: _colors.banner
 
         RowLayout {
             anchors {
@@ -56,6 +58,9 @@ Widgets.NavigableFocusScope {
                 checked: mainPlaylistController.repeatMode !== PlaylistControllerModel.PLAYBACK_REPEAT_NONE
                 onClicked: mainPlaylistController.toggleRepeatMode()
                 focusPolicy: Qt.NoFocus
+
+                color: _colors.buttonText
+                colorDisabled: _colors.textInactive
             }
 
             Widgets.IconToolButton {
@@ -67,6 +72,9 @@ Widgets.NavigableFocusScope {
                 iconText: VLCIcons.shuffle_on
                 onClicked: mainPlaylistController.shuffle()
                 focusPolicy: Qt.NoFocus
+
+                color: _colors.buttonText
+                colorDisabled: _colors.textInactive
             }
 
             Widgets.SortControl {
@@ -96,6 +104,8 @@ Widgets.NavigableFocusScope {
                 Keys.priority: Keys.AfterItem
                 Keys.onPressed: defaultKeyAction(event, 0)
                 navigationParent: playlistToolbar
+
+                _colors: playlistToolbar._colors
             }
 
             Widgets.IconToolButton {
@@ -107,6 +117,9 @@ Widgets.NavigableFocusScope {
                 iconText: VLCIcons.playlist_clear
                 onClicked: mainPlaylistController.clear()
                 focusPolicy: Qt.NoFocus
+
+                color: _colors.buttonText
+                colorDisabled: _colors.textInactive
             }
         }
     }



More information about the vlc-commits mailing list