[vlc-devel] [PATCH 04/39] qml: change foreground color according to background in BannerTabButton

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


---
 modules/gui/qt/widgets/qml/BannerTabButton.qml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/BannerTabButton.qml b/modules/gui/qt/widgets/qml/BannerTabButton.qml
index fba705e033..a53e523aea 100644
--- a/modules/gui/qt/widgets/qml/BannerTabButton.qml
+++ b/modules/gui/qt/widgets/qml/BannerTabButton.qml
@@ -68,15 +68,16 @@ T.TabButton {
 
                 text: control.iconTxt
                 font.pixelSize: VLCIcons.pixelSize(VLCStyle.banner_icon_size)
-                color: control.selected && !(control.activeFocus || control.hovered) ? VLCStyle.colors.accent
-                                                                                     : VLCStyle.colors.text
+                color: (control.activeFocus || control.hovered) ? VLCStyle.colors.accentText
+                                                                : ((control.selected) ? VLCStyle.colors.accent : VLCStyle.colors.text)
             }
 
             Widgets.MenuLabel {
                 id: txt
                 visible: showText
                 font.weight: (control.activeFocus || control.hovered || control.selected) ? Font.DemiBold : Font.Normal
-                color: (control.activeFocus || control.hovered || control.selected) ? VLCStyle.colors.text : VLCStyle.colors.menuCaption
+                color: (control.activeFocus || control.hovered) ? VLCStyle.colors.accentText
+                                                                : ((control.selected) ? VLCStyle.colors.text : VLCStyle.colors.menuCaption)
                 text: control.text
             }
         }
-- 
2.25.1



More information about the vlc-devel mailing list