From e63169eed7b50be528c3d865c6df6ff12db15516 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 20:24:00 +0800 Subject: Improve menu items --- Bootstrap/icons/gear.svg | 4 +++ Bootstrap/icons/info-circle.svg | 4 +++ Bootstrap/icons/person.svg | 3 +++ Bootstrap/icons/power.svg | 4 +++ Eduport.qrc | 4 +++ Header.ui.qml | 59 +++++++++++++++++++++++++++++++++++++++++ imports/Eduport/Eduport.qml | 3 +++ 7 files changed, 81 insertions(+) create mode 100644 Bootstrap/icons/gear.svg create mode 100644 Bootstrap/icons/info-circle.svg create mode 100644 Bootstrap/icons/person.svg create mode 100644 Bootstrap/icons/power.svg diff --git a/Bootstrap/icons/gear.svg b/Bootstrap/icons/gear.svg new file mode 100644 index 0000000..c11dbc1 --- /dev/null +++ b/Bootstrap/icons/gear.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Bootstrap/icons/info-circle.svg b/Bootstrap/icons/info-circle.svg new file mode 100644 index 0000000..8f48f86 --- /dev/null +++ b/Bootstrap/icons/info-circle.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Bootstrap/icons/person.svg b/Bootstrap/icons/person.svg new file mode 100644 index 0000000..18d6411 --- /dev/null +++ b/Bootstrap/icons/person.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Bootstrap/icons/power.svg b/Bootstrap/icons/power.svg new file mode 100644 index 0000000..6fb9756 --- /dev/null +++ b/Bootstrap/icons/power.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Eduport.qrc b/Eduport.qrc index c4ed534..5a6e7fd 100644 --- a/Eduport.qrc +++ b/Eduport.qrc @@ -5,6 +5,10 @@ Heebo/Heebo-Regular.ttf imports/Eduport/Eduport.qml imports/Eduport/qmldir + Bootstrap/icons/person.svg + Bootstrap/icons/gear.svg + Bootstrap/icons/info-circle.svg + Bootstrap/icons/power.svg Bootstrap/icons/sun.svg Bootstrap/icons/moon-stars.svg Button/Sm.ui.qml diff --git a/Header.ui.qml b/Header.ui.qml index c951096..b722078 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -103,7 +103,42 @@ ToolBar { horizontalPadding: 10 verticalPadding: 16 delegate: MenuItem { + id: menuItem font: Eduport.bsBtnFont + horizontalPadding: 16 + verticalPadding: 6.4 + spacing: 8 + contentItem: RowLayout { + + Image { + source: menuItem.icon + .source + sourceSize { + width: + menuItem.icon + .width + height: + menuItem.icon + .height + } + + ColorOverlay { + color: Eduport + .bsDropdownLinkColor + source: parent + anchors.fill: + parent + } + } + + Text { + text: menuItem.text + font: menuItem.font + color: Eduport + .bsDropdownLinkColor + Layout.fillWidth: true + } + } } background: Item { implicitWidth: 260.734 @@ -168,21 +203,45 @@ ToolBar { Action { id: editProfile + icon { + source: + "Bootstrap/icons/person.svg" + width: 19 + height: 22 + } text: qsTr("Edit Profile") } Action { id: accountSettings + icon { + source: + "Bootstrap/icons/gear.svg" + width: 19 + height: 22 + } text: qsTr("Account Settings") } Action { id: help + icon { + source: + "Bootstrap/icons/info-circle.svg" + width: 19 + height: 22 + } text: qsTr("Help") } Action { id: log + icon { + source: + "Bootstrap/icons/power.svg" + width: 19 + height: 22 + } text: qsTr("Sign Out") } diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index d6fac62..ab9957c 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -87,6 +87,9 @@ QtObject { readonly property color bsBtnSuccessDisabledBorderColor: bsBtnSuccessDisabledBg + property color bsDropdownLinkColor: mode == Eduport.Mode.Light + ? "#747579" : "#c5c6cc" + property color bsGray300: mode == Eduport.Mode.Light ? "#dde0e3" : "#3e3e40" property color bsGray500: mode == Eduport.Mode.Light -- cgit v1.2.3