MenuItem: don't take space when not visible
This commit is contained in:
parent
26b01be23c
commit
7331c1fa1c
|
@ -11,7 +11,9 @@ Menu {
|
|||
let rightPadding = 0
|
||||
|
||||
for (let i = 0; i < count; ++i) {
|
||||
let item = itemAt(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
|
||||
|
|
Loading…
Reference in New Issue
Block a user