summaryrefslogtreecommitdiff
path: root/CardGrid.ui.qml
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-06 12:30:29 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-06 12:30:29 +0800
commit60d9c266e2a4525f40ecb0cafea760c3e60ceb65 (patch)
tree0308371adbe6b4bca81e896c5b67e1ecb9b92e4a /CardGrid.ui.qml
parenta4f8e980c426050d09a2465fdb7e5290eb77b2b4 (diff)
Customise badge background instead
Diffstat (limited to 'CardGrid.ui.qml')
-rw-r--r--CardGrid.ui.qml45
1 files changed, 19 insertions, 26 deletions
diff --git a/CardGrid.ui.qml b/CardGrid.ui.qml
index cc280e2..4ec20f6 100644
--- a/CardGrid.ui.qml
+++ b/CardGrid.ui.qml
@@ -82,37 +82,30 @@ Item {
Layout.fillWidth: true
Layout.bottomMargin: 8
- Rectangle {
+ FontLoader {
+ id: roboto
+ source: doesntEmbed ? "" : "Roboto/Roboto-Regular.ttf"
+ }
+
+ Label {
id: badge
- color: badgeBackgroundColor
- implicitWidth: badgeLabel
- .width + 18
- implicitHeight: badgeLabel
- .height + 6
- radius: 6
anchors {
left: parent.left
- verticalCenter: parent
- .verticalCenter
+ verticalCenter: parent.verticalCenter
}
-
- FontLoader {
- id: roboto
- source: doesntEmbed ? ""
- : "Roboto/Roboto-Regular.ttf"
+ topPadding: 4.463
+ leftPadding: 8.287
+ rightPadding: 8.287
+ bottomPadding: 4.463
+ text: badgeText
+ color: badgeColor
+ font {
+ family: doesntEmbed ? "Roboto" : roboto.name
+ pixelSize: 13
}
-
- Label {
- id: badgeLabel
- text: badgeText
- color: badgeColor
- font {
- family: doesntEmbed
- ? "Roboto"
- : roboto.name
- pixelSize: 13
- }
- anchors.centerIn: parent
+ background: Rectangle {
+ color: badgeBackgroundColor
+ radius: 6
}
}