From dcd732b4cfbfa8bf8e489f12a9e7b4bd9bb6b922 Mon Sep 17 00:00:00 2001 From: Prince Gupta Date: Wed, 23 Dec 2020 23:26:08 +0530 Subject: [PATCH] qml: change foreground based on background in IconToolButton Signed-off-by: Pierre Lamot --- 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.11.4.GIT