summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-29 07:55:36 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-29 07:55:36 +0800
commit062b97c14a49c1caed1a36ae881eba1367176a29 (patch)
tree726e6d331867168a18d781b8ddafa2dc1cf0cbc3
parente602301676e7ab6e63f0e3618329d6a7dca27306 (diff)
Simplify mode test
-rw-r--r--Header.ui.qml15
-rw-r--r--imports/Eduport/Eduport.qml24
2 files changed, 14 insertions, 25 deletions
diff --git a/Header.ui.qml b/Header.ui.qml
index c320a65..5ed8093 100644
--- a/Header.ui.qml
+++ b/Header.ui.qml
@@ -77,9 +77,8 @@ ToolBar {
implicitWidth: menu.width
implicitHeight: 1
color: Eduport.mode
- == Eduport.Mode.Light
- ? Eduport.bsGray500
- : Eduport.bsGray300
+ ? Eduport.bsGray300
+ : Eduport.bsGray500
}
}
}
@@ -153,9 +152,8 @@ ToolBar {
? Eduport
.bsDropdownLinkHoverBg
: Eduport.mode
- == Eduport.Mode.Light
- ? Eduport.bsBodyBg
- : Eduport.bsDark
+ ? Eduport.bsDark
+ : Eduport.bsBodyBg
radius: 5.2
}
}
@@ -168,9 +166,8 @@ ToolBar {
anchors.fill: parent
radius: 5.2
color: Eduport.mode
- == Eduport.Mode.Light
- ? Eduport.bsBodyBg
- : Eduport.bsDark
+ ? Eduport.bsDark
+ : Eduport.bsBodyBg
}
DrpShdw.Box {
diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml
index 7cda90b..94f84f9 100644
--- a/imports/Eduport/Eduport.qml
+++ b/imports/Eduport/Eduport.qml
@@ -41,15 +41,12 @@ QtObject {
})
readonly property color bsPrimary: "#066ac9"
- property color bsLight: mode == Eduport.Mode.Light
- ? "#f5f7f9" : "#2a2c31"
- property color bsDark: mode == Eduport.Mode.Light
- ? "#24292d" : "#0f0f10"
+ property color bsLight: mode ? "#2a2c31" : "#f5f7f9"
+ property color bsDark: mode ? "#0f0f10" : "#24292d"
readonly property real bsBadgeFontSize: 13.6
- property color bsBodyBg: mode == Eduport.Mode.Light
- ? "#ffffff" : "#222529"
+ property color bsBodyBg: mode ? "#222529" : "#ffffff"
property real bsBorderRadius: 5.2
@@ -89,20 +86,15 @@ QtObject {
bsBtnSuccessDisabledBg
property color bsDropdownColor: "#747579"
- property color bsDropdownLinkColor: mode == Eduport.Mode.Light
- ? "#747579" : "#c5c6cc"
+ property color bsDropdownLinkColor: mode ? "#c5c6cc" : "#747579"
property color bsDropdownLinkHoverColor: "#066ac9"
property color bsDropdownLinkHoverBg: "#1a066ac9"
- property color bsHeadingColor: mode == Eduport.Mode.Light
- ? "#24292d" : "#ffffff"
+ property color bsHeadingColor: mode ? "#ffffff" : "#24292d"
- property color bsGray300: mode == Eduport.Mode.Light
- ? "#dde0e3" : "#3e3e40"
- property color bsGray500: mode == Eduport.Mode.Light
- ? "#9a9ea4" : "#bfc0c9"
- property color bsGray800: mode == Eduport.Mode.Light
- ? "#24292d" : "#f7f5f5"
+ property color bsGray300: mode ? "#3e3e40" : "#dde0e3"
+ property color bsGray500: mode ? "#bfc0c9" : "#9a9ea4"
+ property color bsGray800: mode ? "#f7f5f5" : "#24292d"
readonly property bool haveRoboto: Qt.platform.os === "android"
|| Qt.platform.os === "linux"