diff options
author | Jonas Karlsson <jonas.karlsson@qt.io> | 2024-03-01 14:20:16 +0100 |
---|---|---|
committer | Jonas Karlsson <jonas.karlsson@qt.io> | 2024-03-12 20:11:07 +0000 |
commit | 691a8b9bc3544e1b8f012570550914871528d733 (patch) | |
tree | d81236ca901dcd313e23dcafbbe612fadba851da | |
parent | 5eb9a602dcfe3422a15900a55445fb91824d07ba (diff) |
Dice example: center text
Fixes: QTBUG-121144
Change-Id: Ifa4735307bda97dd9e830af8acac6239358fb1e1
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
-rw-r--r-- | examples/demos/dice/main.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/demos/dice/main.qml b/examples/demos/dice/main.qml index e18a6e4a2..1d84307f3 100644 --- a/examples/demos/dice/main.qml +++ b/examples/demos/dice/main.qml @@ -48,18 +48,18 @@ ApplicationWindow { Label { id: tapLabel - width: parent.width - 20 // so text does not touch screen edges - height: text.height - anchors { - centerIn: parent - } - text: qsTr("Tap, click or shake to throw dice") + anchors.fill: parent + padding: parent.width * 0.1 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + fontSizeMode: Text.Fit font.bold: true + font.pixelSize: 64 + text: qsTr("Tap, click or shake to throw dice") + wrapMode: Text.NoWrap style: Text.Raised color: "white" minimumPixelSize: 10 - font.pixelSize: 32 - wrapMode: Text.WordWrap NumberAnimation on opacity { id: tapLabelAnimation running: false |