From 6aab39fc699992ea600f5472affa47fe7691885e 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, 22 Mar 2023 11:52:15 +0800 Subject: Card uses custom labels --- Home/Default/Card.ui.qml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/Home/Default/Card.ui.qml b/Home/Default/Card.ui.qml index d10ebf1..d2ad479 100644 --- a/Home/Default/Card.ui.qml +++ b/Home/Default/Card.ui.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import QtGraphicalEffects 1.15 import Bootstrap 5.3 import Eduport 1.4 +import "../../Label" as Lbl Item { property string imageSource: "https://eduport.webestica.com/assets/images/courses/4by3/11.jpg" @@ -83,7 +84,7 @@ Item { Layout.fillWidth: true Layout.bottomMargin: 8 - Label { + Lbl.Body { id: badge anchors.left: parent.left topPadding: 4.463 @@ -92,12 +93,7 @@ Item { bottomPadding: 4.463 text: badgeText color: badgeColor - font { - family: Bootstrap.bodyFont - .family - pointSize: Bootstrap - .badgeFontSize - } + font.pointSize: Bootstrap.badgeFontSize background: Rectangle { color: badgeBackgroundColor radius: 6 @@ -119,18 +115,13 @@ Item { } } - Label { + Lbl.Hx { id: title text: titleText color: Qt.rgba(.141, .161, .176, 1.0) - wrapMode: Text.Wrap Layout.fillWidth: true Layout.bottomMargin: 8 - font { - family: Eduport.hFont.family - weight: Eduport.hFont.weight - pointSize: 20.1 + .00075 * parent.width - } + font.pointSize: 20.1 + .00075 * parent.width MouseArea { id: titleArea @@ -138,19 +129,13 @@ Item { } } - Label { + Lbl.Body { text: truncatedText color: Qt.rgba(.455, .459, .475, 1.0) - wrapMode: Text.Wrap elide: Text.ElideRight maximumLineCount: 2 Layout.fillWidth: true Layout.bottomMargin: 8 - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Bootstrap.bodyFont.pointSize - } } RowLayout { -- cgit v1.2.3