From 07c475dd96d16181834816194f20a0b79f763520 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 17:33:33 +0800 Subject: Light/Dark mode buttons start to function --- imports/Eduport/Eduport.qml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'imports/Eduport') 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" -- cgit v1.2.3