[vlc-devel] [PATCH 27/39] qml: change foreground based on background in IconToolButton

Prince Gupta guptaprince8832 at gmail.com
Thu Jan 7 11:50:23 UTC 2021


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



More information about the vlc-devel mailing list