diff options
author | Anatasof Wirapraja <anatasof.wirapraja@gmail.com> | 2023-02-03 10:51:35 +0700 |
---|---|---|
committer | Anatasof Wirapraja <anatasof.wirapraja@gmail.com> | 2023-02-03 10:51:35 +0700 |
commit | 05904fa4da0710f9f2b759046a446e1040656f8e (patch) | |
tree | a47daf4661c46781d66acda7fa5e6ff29185b26f | |
parent | 6ded0776af59bd6ff9d5cc916ab5329e8c966a83 (diff) |
add discountLabel background
-rw-r--r-- | ClassicDetailFlickable.ui.qml | 20 |
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 + } } } |