[vlc-devel] [PATCH 14/16] qml: fix color handling in MenuBar
Prince Gupta
guptaprince8832 at gmail.com
Tue Feb 23 10:06:04 UTC 2021
---
modules/gui/qt/menus/qml/Menubar.qml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/menus/qml/Menubar.qml b/modules/gui/qt/menus/qml/Menubar.qml
index 97ffa4c486..d5b73e4aaa 100644
--- a/modules/gui/qt/menus/qml/Menubar.qml
+++ b/modules/gui/qt/menus/qml/Menubar.qml
@@ -31,8 +31,10 @@ Item {
implicitHeight: menubarLayout.implicitHeight
implicitWidth: menubarLayout.implicitWidth
+ property color bgColor: "transparent"
property color textColor: VLCStyle.colors.text
- property color bgColor: VLCStyle.colors.bgHover
+ property color highlightedBgColor: VLCStyle.colors.bgHover
+ property color highlightedTextColor: VLCStyle.colors.bgHoverText
Action{ id: mediaMenu; text: i18n.qtr("&Media") ; onTriggered: menubar.popupMediaMenu(source); }
Action{ id: playbackMenu; text: i18n.qtr("&Playback") ; onTriggered: menubar.popupPlaybackMenu(source);}
@@ -104,12 +106,12 @@ Item {
text: control.text
font: control.font
opacity: enabled ? 1.0 : 0.3
- color: root.textColor
+ color: (control.hovered || index === root._menuIndex) ? root.highlightedTextColor : root.textColor
}
background: Rectangle {
- color: (control.hovered || index === root._menuIndex) ? root.bgColor
- : "transparent"
+ color: (control.hovered || index === root._menuIndex) ? root.highlightedBgColor
+ : root.bgColor
}
}
}
--
2.25.1
More information about the vlc-devel
mailing list