From 0e9a5785ff67e5298d837b16a6b8b622b90baece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 28 Mar 2023 23:22:16 +0800 Subject: Set menu item hover colours --- Header.ui.qml | 23 ++++++++++++++++++++--- imports/Eduport/Eduport.qml | 2 ++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Header.ui.qml b/Header.ui.qml index 0a9d80e..cf8d5e6 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -123,7 +123,11 @@ ToolBar { } ColorOverlay { - color: Eduport + color: + highlighted + ? Eduport + .bsDropdownLinkHoverColor + : Eduport .bsDropdownLinkColor source: parent anchors.fill: @@ -134,11 +138,24 @@ ToolBar { Text { text: menuItem.text font: menuItem.font - color: Eduport - .bsDropdownLinkColor + color: highlighted + ? Eduport + .bsDropdownLinkHoverColor + : Eduport + .bsDropdownLinkColor Layout.fillWidth: true } } + background: Rectangle { + color: highlighted + ? Eduport + .bsDropdownLinkHoverBg + : Eduport.mode + == Eduport.Mode.Light + ? Eduport.bsBodyBg + : Eduport.bsDark + radius: 5.2 + } } background: Item { implicitWidth: 260.734 diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index e7106ec..7cda90b 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -91,6 +91,8 @@ QtObject { property color bsDropdownColor: "#747579" property color bsDropdownLinkColor: mode == Eduport.Mode.Light ? "#747579" : "#c5c6cc" + property color bsDropdownLinkHoverColor: "#066ac9" + property color bsDropdownLinkHoverBg: "#1a066ac9" property color bsHeadingColor: mode == Eduport.Mode.Light ? "#24292d" : "#ffffff" -- cgit v1.2.3