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 }