diff options
Diffstat (limited to 'CardGrid.ui.qml')
-rw-r--r-- | CardGrid.ui.qml | 45 |
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 } } |