MenuItem: don't take space when not visible
This commit is contained in:
		@@ -12,6 +12,8 @@ Menu {
 | 
			
		||||
 | 
			
		||||
        for (let i = 0; i < count; ++i) {
 | 
			
		||||
            let item = itemAt(i)
 | 
			
		||||
            if (! item.visible) continue
 | 
			
		||||
 | 
			
		||||
            result       = Math.max(item.contentItem.implicitWidth, result)
 | 
			
		||||
            leftPadding  = Math.max(item.leftPadding, leftPadding)
 | 
			
		||||
            rightPadding = Math.max(item.rightPadding, rightPadding)
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,7 @@ MenuItem {
 | 
			
		||||
    rightPadding: spacing
 | 
			
		||||
    topPadding: spacing / 1.75
 | 
			
		||||
    bottomPadding: spacing / 1.75
 | 
			
		||||
    height: visible ? implicitHeight : 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    readonly property alias iconItem: contentItem.icon
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user