From 8fadf0cc69f2a4fd48a6599a0e632d455bd19940 Mon Sep 17 00:00:00 2001 From: Prince Gupta Date: Mon, 14 Dec 2020 22:29:30 +0530 Subject: [PATCH] qml: change foreground of FocusBackground according to background Signed-off-by: Pierre Lamot --- modules/gui/qt/widgets/qml/FocusBackground.qml | 4 ++++ modules/gui/qt/widgets/qml/TabButtonExt.qml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt/widgets/qml/FocusBackground.qml b/modules/gui/qt/widgets/qml/FocusBackground.qml index f703f8ab49..f416dac063 100644 --- a/modules/gui/qt/widgets/qml/FocusBackground.qml +++ b/modules/gui/qt/widgets/qml/FocusBackground.qml @@ -25,6 +25,7 @@ Rectangle { property bool active: activeFocus property bool selected: false + property color foregroundColor: VLCStyle.colors.text states: [ State { @@ -33,6 +34,7 @@ Rectangle { PropertyChanges { target: root color: VLCStyle.colors.bgHoverInactive + foregroundColor: VLCStyle.colors.bgHoverText } }, State { @@ -41,6 +43,7 @@ Rectangle { PropertyChanges { target: root color: VLCStyle.colors.accent + foregroundColor: VLCStyle.colors.accentText } }, State { @@ -49,6 +52,7 @@ Rectangle { PropertyChanges { target: root color: "transparent" + foregroundColor: VLCStyle.colors.text } } ] diff --git a/modules/gui/qt/widgets/qml/TabButtonExt.qml b/modules/gui/qt/widgets/qml/TabButtonExt.qml index 6ec3682746..2b526129b4 100644 --- a/modules/gui/qt/widgets/qml/TabButtonExt.qml +++ b/modules/gui/qt/widgets/qml/TabButtonExt.qml @@ -37,12 +37,14 @@ T.TabButton { property string iconTxt: "" property bool selected: false - property color color: VLCStyle.colors.text + property color color: focusBackground.foregroundColor property bool busy: false font.pixelSize: VLCStyle.fontSize_normal background: FocusBackground { + id: focusBackground + height: control.height width: control.width active: (control.activeFocus || control.hovered) -- 2.11.4.GIT