From cfc73864697f0145b262d8a82ac49658af45cac3 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: Wed, 29 Mar 2023 09:08:46 +0800 Subject: Card supports dark mode --- Home/Default/Card.ui.qml | 5 +++-- Label/FwLight.ui.qml | 2 +- imports/Eduport/Eduport.qml | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Home/Default/Card.ui.qml b/Home/Default/Card.ui.qml index 9fc3ff5..4f2e309 100644 --- a/Home/Default/Card.ui.qml +++ b/Home/Default/Card.ui.qml @@ -31,6 +31,7 @@ Item { Rectangle { id: rectangle radius: 8 + color: Eduport.bsCardBg anchors { fill: parent topMargin: 25.6 @@ -59,6 +60,7 @@ Item { Rectangle { height: 16 + color: Eduport.bsCardBg anchors { left: parent.left right: parent.right @@ -126,7 +128,7 @@ Item { Lbl.H5 { id: title text: titleText - color: Qt.rgba(.141, .161, .176, 1.0) + color: Eduport.bsCardTitleColor Layout.fillWidth: true Layout.bottomMargin: 8 @@ -138,7 +140,6 @@ Item { Lbl.Body { text: truncatedText - color: Qt.rgba(.455, .459, .475, 1.0) elide: Text.ElideRight maximumLineCount: 2 Layout.fillWidth: true diff --git a/Label/FwLight.ui.qml b/Label/FwLight.ui.qml index d88e30d..f012fe5 100644 --- a/Label/FwLight.ui.qml +++ b/Label/FwLight.ui.qml @@ -2,7 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import Eduport 1.4 -Label { +H6 { font { family: Eduport.fwLightFont.family weight: Eduport.fwLightFont.weight diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index 240319a..8e01bdd 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -86,6 +86,9 @@ QtObject { readonly property color bsBtnSuccessDisabledBorderColor: bsBtnSuccessDisabledBg + property color bsCardBg: mode ? "#1b1e21" : "#ffffff" + property color bsCardTitleColor: mode ? "#f7f5f5" : "#24292d" + property color bsDropdownColor: "#747579" property color bsDropdownLinkColor: mode ? "#c5c6cc" : "#747579" property color bsDropdownLinkHoverColor: "#066ac9" -- cgit v1.2.3