From 1b9f56346b49f26b24889c7362363dbb381fc1f2 Mon Sep 17 00:00:00 2001 From: krasko <154632626+krasko78@users.noreply.github.com> Date: Wed, 6 Nov 2024 22:43:16 +0100 Subject: [PATCH] 25452: Fixing indent on menu items with check marks and/or icons --- .../qml/Muse/UiComponents/internal/StyledMenuItem.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/internal/StyledMenuItem.qml b/src/framework/uicomponents/qml/Muse/UiComponents/internal/StyledMenuItem.qml index bc103eaca1c0f..cdff1a0bb7748 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/internal/StyledMenuItem.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/internal/StyledMenuItem.qml @@ -136,12 +136,12 @@ ListItemBlank { result += rowLayout.anchors.leftMargin if (primaryIconLabel.visible) { - result += Math.ceil(primaryIconLabel.width) + result += Math.ceil(primaryIconLabel.Layout.preferredWidth) result += rowLayout.spacing } if (secondaryIconLabel.visible) { - result += Math.ceil(secondaryIconLabel.width) + result += Math.ceil(secondaryIconLabel.Layout.preferredWidth) result += rowLayout.spacing } @@ -183,7 +183,7 @@ ListItemBlank { StyledIconLabel { id: primaryIconLabel Layout.alignment: Qt.AlignLeft - width: 16 + Layout.preferredWidth: 16 iconCode: { if (root.iconAndCheckMarkMode !== StyledMenuItem.ShowBoth && itemPrv.hasIcon) { return root.modelData?.icon ?? IconCode.NONE @@ -201,7 +201,7 @@ ListItemBlank { StyledIconLabel { id: secondaryIconLabel Layout.alignment: Qt.AlignLeft - width: 16 + Layout.preferredWidth: 16 iconCode: root.modelData?.icon ?? IconCode.NONE visible: root.iconAndCheckMarkMode === StyledMenuItem.ShowBoth }