summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2022-03-24 11:15:39 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2022-03-24 09:27:15 +0000
commit4b96545a23486687aa04b91199beb302e4b68791 (patch)
tree8f3121a7decfcc14ed6d370df89ed68fc52b4347
parentcd9a5b1c8dc6dc46243d1fe361b99dd23d174003 (diff)
downloadqt-creator-4b96545a23486687aa04b91199beb302e4b68791.tar.gz
QmlDesigner: Fix add new state plus button centering on all sizes
Take the font size into account when centering the plus sign so it centers well at all button heights. Fixes: QDS-6529 Change-Id: Ie221fd2adb0fa19ad6fee1120ea33e702240960c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml
index 142aaa5c83..ec5dabb23b 100644
--- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml
+++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml
@@ -161,7 +161,7 @@ FocusScope {
Text {
text: "+"
anchors.centerIn: parent
- anchors.verticalCenterOffset: -16
+ anchors.verticalCenterOffset: -(5 + (font.pixelSize - 35) / 9)
font.pixelSize: parent.height * .5
color: Qt.lighter(StudioTheme.Values.themeControlBackgroundInteraction, addState.containsMouse ? 1.5 : 1)
}