summaryrefslogtreecommitdiff
path: root/ClassicDetailFlickable.ui.qml
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2023-02-03 10:51:35 +0700
committerAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2023-02-03 10:51:35 +0700
commit05904fa4da0710f9f2b759046a446e1040656f8e (patch)
treea47daf4661c46781d66acda7fa5e6ff29185b26f /ClassicDetailFlickable.ui.qml
parent6ded0776af59bd6ff9d5cc916ab5329e8c966a83 (diff)
add discountLabel background
Diffstat (limited to 'ClassicDetailFlickable.ui.qml')
-rw-r--r--ClassicDetailFlickable.ui.qml20
1 files changed, 15 insertions, 5 deletions
diff --git a/ClassicDetailFlickable.ui.qml b/ClassicDetailFlickable.ui.qml
index 3027acf..76d8e57 100644
--- a/ClassicDetailFlickable.ui.qml
+++ b/ClassicDetailFlickable.ui.qml
@@ -89,7 +89,7 @@ Flickable {
ColumnLayout {
RowLayout {
-
+ implicitWidth: price.width + originalPrice.width + discountLabel.width
Label {
id: price
text: "$150"
@@ -103,10 +103,20 @@ Flickable {
font.strikeout: true
}
- Label {
- id: discount
- text: qsTr("60% off")
- font.pixelSize: 14
+ Rectangle {
+ id: discountLabel
+ implicitWidth: discount.width
+ implicitHeight: discount.height
+ radius: 8
+ color: "#6c757d"
+ Label {
+ id: discount
+ text: qsTr("60% off")
+ font.pixelSize: 14
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ padding: 4
+ }
}
}