[vlc-devel] [PATCH 18/26] qml: change foreground of FocusBackground according to background

Prince Gupta guptaprince8832 at gmail.com
Thu Dec 17 17:26:16 UTC 2020


---
 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.25.1



More information about the vlc-devel mailing list