Fix breakages in autosizing menu when item does not have expected internal properties
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 6 Jun 2024 09:48:10 +0000 (17:48 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 6 Jun 2024 16:17:40 +0000 (00:17 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/tray/AutoSizingMenu.qml

index 5be41907c67801d254f8919cb33d81c9b9296309..1d3134b37306982f9dc3187c71967d5dffa0f617 100644 (file)
@@ -8,7 +8,7 @@ Menu {
         var padding = 0;
         for (var i = 0; i < count; ++i) {
             var item = itemAt(i);
-            result = Math.max(item.contentItem.implicitWidth, result);
+            result = Math.max(item.implicitWidth, result);
             padding = Math.max(item.padding, padding);
         }
         return result + padding * 2;