[vlc-devel] [PATCH 06/21] qml: allow forcing colors of IconToolButton widget

Pierre Lamot pierre at videolabs.io
Wed Aug 7 15:52:12 CEST 2019


---
 modules/gui/qt/qml/utils/IconToolButton.qml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/qml/utils/IconToolButton.qml b/modules/gui/qt/qml/utils/IconToolButton.qml
index 6b0bcd0199..be7c9e98fc 100644
--- a/modules/gui/qt/qml/utils/IconToolButton.qml
+++ b/modules/gui/qt/qml/utils/IconToolButton.qml
@@ -22,15 +22,14 @@ import "qrc:///style/"
 
 ToolButton {
     id: control
-    property color color: control.enabled ?
-                              VLCStyle.colors.buttonText : VLCStyle.colors.lightText
-
     property int size: VLCStyle.icon_normal
 
     property color highlightColor: VLCStyle.colors.accent
 
     padding: 0
 
+    property color color: VLCStyle.colors.buttonText
+    property color colorDisabled: VLCStyle.colors.lightText
     property color colorOverlay: "transparent"
     property string textOverlay: ""
 
@@ -51,7 +50,7 @@ ToolButton {
         Label {
             id: text
             text: control.text
-            color: control.color
+            color: control.enabled ? control.color : control.colorDisabled
 
             anchors.centerIn: parent
 
-- 
2.17.1



More information about the vlc-devel mailing list