From 0b5e8d11af518394e5858321262e2f00ec8d78d5 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 18:15:45 +0800 Subject: Mode button icons but somehow they aren't showing up yet --- Bootstrap/icons/moon-stars.svg | 4 ++++ Bootstrap/icons/sun.svg | 3 +++ Eduport.qrc | 14 +++++++----- Header.ui.qml | 50 +++++++++++++++++++++++++++++++++++++----- 4 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 Bootstrap/icons/moon-stars.svg create mode 100644 Bootstrap/icons/sun.svg diff --git a/Bootstrap/icons/moon-stars.svg b/Bootstrap/icons/moon-stars.svg new file mode 100644 index 0000000..b25ef86 --- /dev/null +++ b/Bootstrap/icons/moon-stars.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Bootstrap/icons/sun.svg b/Bootstrap/icons/sun.svg new file mode 100644 index 0000000..c311208 --- /dev/null +++ b/Bootstrap/icons/sun.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Eduport.qrc b/Eduport.qrc index 3c9a27d..c4ed534 100644 --- a/Eduport.qrc +++ b/Eduport.qrc @@ -5,6 +5,14 @@ Heebo/Heebo-Regular.ttf imports/Eduport/Eduport.qml imports/Eduport/qmldir + Bootstrap/icons/sun.svg + Bootstrap/icons/moon-stars.svg + Button/Sm.ui.qml + Button/Btn.ui.qml + Button/Primary.ui.qml + Button/Success.ui.qml + Button/NavLink.ui.qml + Button/NavLink/TabsLine.ui.qml DropShadow/Box.ui.qml Label/Body.ui.qml Label/FwLight.ui.qml @@ -16,12 +24,6 @@ Label/H1.ui.qml Label/Display6.ui.qml TextField/Input.ui.qml - Button/Btn.ui.qml - Button/Primary.ui.qml - Button/Success.ui.qml - Button/Sm.ui.qml - Button/NavLink.ui.qml - Button/NavLink/TabsLine.ui.qml Header.ui.qml diff --git a/Header.ui.qml b/Header.ui.qml index 85fb1c4..bd36d9f 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -201,28 +201,66 @@ ToolBar { Btn.Sm { id: light + display: + AbstractButton. + TextBesideIcon + icon { + source: + "Bootstrap/icons/sun.svg" + width: + 16 + height: + 16 + color: + checked + ? + Eduport + .bsGray800 + : + Eduport + .bsBtnColor + } text: qsTr("Light") - Layout - .fillWidth: - true checked: Eduport .mode == Eduport .Mode.Light enabled: !checked + Layout + .fillWidth: + true } Btn.Sm { id: dark + display: + AbstractButton. + TextBesideIcon + icon { + source: + "Bootstrap/icons/moon-stars.svg" + width: + 16 + height: + 16 + color: + checked + ? + Eduport + .bsGray800 + : + Eduport + .bsBtnColor + } text: qsTr("Dark") - Layout - .fillWidth: - true checked: Eduport .mode == Eduport .Mode.Dark enabled: !checked + Layout + .fillWidth: + true } } } -- cgit v1.2.3