Skip to content

Commit

Permalink
Merge pull request #25453 from krasko78/25452-TextsOfMenuItemWithChec…
Browse files Browse the repository at this point in the history
…kMarksOrIconsAreIndented

25452: Fixing indent on menu items with check marks and/or icons
  • Loading branch information
cbjeukendrup authored Nov 20, 2024
2 parents 1dce053 + 1b9f563 commit 9fd3271
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 9fd3271

Please sign in to comment.