[vlc-commits] qml: change foreground color according to background in BannerTabButton

Prince Gupta git at videolan.org
Thu Jan 14 14:42:07 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Mon Dec 21 23:39:01 2020 +0530| [03eaaf8a876763a2d82e0f3c6e1e9173bdca8ba8] | committer: Pierre Lamot

qml: change foreground color according to background in BannerTabButton

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03eaaf8a876763a2d82e0f3c6e1e9173bdca8ba8
---

 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
             }
         }



More information about the vlc-commits mailing list