Turns out that the ListView embedded in the Menu (reachable via
contentItem) would create a binding loop if we're using its
childrenRect. But really we're interested in the total width for the
instantiated delegate *inside* the ListView. That's why we go one level
deeper and get the childrenRect of the inner contentItem instead.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Menu {\r
id: appsMenu\r
y: (trayWindowAppsButton.y + trayWindowAppsButton.height + 2)\r
- width: Math.min(contentItem.childrenRect.width + 4, Style.trayWindowWidth / 2)\r
+ readonly property Item listContentItem: contentItem.contentItem\r
+ width: Math.min(listContentItem.childrenRect.width + 4, Style.trayWindowWidth / 2)\r
closePolicy: "CloseOnPressOutside"\r
\r
background: Rectangle {\r