vlc | branch: master | Prince Gupta <guptaprince8...@gmail.com> | Wed Dec 23 
23:44:08 2020 +0530| [dcd732b4cfbfa8bf8e489f12a9e7b4bd9bb6b922] | committer: 
Pierre Lamot

qml: change foreground based on background in IconToolButton

Signed-off-by: Pierre Lamot <pie...@videolabs.io>

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

 modules/gui/qt/widgets/qml/IconToolButton.qml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/IconToolButton.qml 
b/modules/gui/qt/widgets/qml/IconToolButton.qml
index b90be77273..08cfc76ca3 100644
--- a/modules/gui/qt/widgets/qml/IconToolButton.qml
+++ b/modules/gui/qt/widgets/qml/IconToolButton.qml
@@ -29,7 +29,7 @@ ToolButton {
     padding: 0
 
     property string iconText: ""
-    property color color: VLCStyle.colors.buttonText
+    property color color: focusBackground.foregroundColor
     property color colorDisabled: VLCStyle.colors.textInactive
     property color colorOverlay: "transparent"
     property string textOverlay: ""
@@ -105,7 +105,9 @@ ToolButton {
 
     background: FocusBackground {
         id: focusBackground
-        active: control.activeFocus || control.hovered || control.highlighted
+
+        active: control.activeFocus || control.hovered
+        defaultForeground: control.highlighted ? VLCStyle.colors.accent : 
VLCStyle.colors.icon
         implicitHeight: control.size
         implicitWidth: control.size
     }

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to