diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-28 17:33:33 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-28 17:33:33 +0800 |
commit | 07c475dd96d16181834816194f20a0b79f763520 (patch) | |
tree | 5bde2fbfd6f3021d58810047a3e36fd08ac2da17 /imports/Eduport | |
parent | d43eceadb6df87d13c91389f1bcfac5914a42218 (diff) |
Light/Dark mode buttons start to function
Diffstat (limited to 'imports/Eduport')
-rw-r--r-- | imports/Eduport/Eduport.qml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index b77b0dc..933ef90 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -2,13 +2,19 @@ pragma Singleton import QtQuick 2.15 QtObject { + enum Mode { + Light = 0, + Dark + } + property int mode: Eduport.Mode.Light + readonly property real leadFontSize: 18.75 readonly property real formControlFontSize: 16 readonly property real h6FontSize: 15 readonly property real formTextFontSize: 14 readonly property real navPillsBorderRadius: bsBtnBorderRadius - readonly property color navPillsLinkActiveColor: bsBtnColor + readonly property color navPillsLinkActiveColor: "#ffffff" readonly property color navPillsLinkActiveBg: bsPrimary readonly property font baseFont: Qt.font({ @@ -35,8 +41,15 @@ QtObject { }) readonly property color bsPrimary: "#066ac9" + property color bsLight: "#f5f7f9" + readonly property real bsBadgeFontSize: 13.6 + property color bsBodyBg: mode == Eduport.Mode.Light + ? "#ffffff" : "#222529" + + property real bsBorderRadius: 5.2 + property real bsBoxShadowOffsetX: 0 property real bsBoxShadowOffsetY: 0 property int bsBoxShadowBlurRadius: 40 @@ -49,7 +62,7 @@ QtObject { weight: Font.Medium, pointSize: 15 }) - readonly property color bsBtnColor: "#ffffff" + readonly property color bsBtnColor: "#747579" readonly property color bsBtnBg: "transparent" readonly property real bsBtnBorderWidth: 1 readonly property color bsBtnBorderColor: bsBtnBg @@ -71,6 +84,9 @@ QtObject { readonly property color bsBtnSuccessDisabledBorderColor: bsBtnSuccessDisabledBg + property color bsGray800: mode == Eduport.Mode.Light + ? "#24292d" : "#f7f5f5" + readonly property bool haveRoboto: Qt.platform.os === "android" || Qt.platform.os === "linux" || Qt.platform.os === "osx" |