[vlc-commits] qml: change foreground of FocusBackground according to background
Prince Gupta
git at videolan.org
Mon Jan 4 13:37:48 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Mon Dec 14 22:47:30 2020 +0530| [8fadf0cc69f2a4fd48a6599a0e632d455bd19940] | committer: Pierre Lamot
qml: change foreground of FocusBackground according to background
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fadf0cc69f2a4fd48a6599a0e632d455bd19940
---
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)
More information about the vlc-commits
mailing list