From 4b96545a23486687aa04b91199beb302e4b68791 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 24 Mar 2022 11:15:39 +0200 Subject: 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 --- share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } -- cgit v1.2.3