summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-27 11:11:02 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-27 11:11:02 +0800
commit7510bfd4fcef8d26f7423953b7c60923b2f38c13 (patch)
treed60cff001d2a55d11316b75a533fc527582b6ca0
parent2b3bfa6379bfe03e0140157c2b0d262be6a06ac0 (diff)
Colours for the badge
-rw-r--r--GridCardItem.ui.qml23
1 files changed, 20 insertions, 3 deletions
diff --git a/GridCardItem.ui.qml b/GridCardItem.ui.qml
index 546c7fe..586ac8c 100644
--- a/GridCardItem.ui.qml
+++ b/GridCardItem.ui.qml
@@ -4,7 +4,15 @@ import QtGraphicalEffects 1.15
Item {
property string imageSource: "Darapsa.svg"
+ readonly property color allLevels: "#6f42c1ff"
+ readonly property color beginner: "#0cbc87ff"
+ readonly property color intermediate: "#17a2b8ff"
+ readonly property color allLevelsBackground: "#6f42c11a"
+ readonly property color beginnerBackground: "#0cbc871a"
+ readonly property color intermediateBackground: "#17a2b81a"
property string badgeText: "Beginner"
+ property color badgeColor: "#0cbc87ff"
+ property color badgeBackgroundColor: "#0cbc871a"
property string titleText: "Sketch from A to Z: for app designer"
// property string textTruncateText: "Rooms oh fully taken by worse do. Points afraid but may end afraid but.."
@@ -65,14 +73,23 @@ Item {
rightMargin: 20
}
- Label {
+ Rectangle {
id: badge
- text: badgeText
- font.pointSize:12
+ color: badgeBackgroundColor
+ implicitWidth: badgeLabel.width + 8
+ implicitHeight: badgeLabel.height + 4
+ radius: 6
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
+ Label {
+ id: badgeLabel
+ text: badgeText
+ color: badgeColor
+ font.pixelSize: 13
+ anchors.centerIn: parent
+ }
}
Image {