The app menu had a width based on the header button size which was
way too narrow to display its content.
This commit changes the width based on the contents (menu items) of
the menu, however, limiting the maximum width to half the window width.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Menu {\r
id: appsMenu\r
y: (trayWindowAppsButton.y + trayWindowAppsButton.height + 2)\r
- width: (Style.headerButtonIconSize * 3)\r
+ width: Math.min(contentItem.childrenRect.width + 4, Style.trayWindowWidth / 2)\r
closePolicy: "CloseOnPressOutside"\r
\r
background: Rectangle {\r
text: appName\r
font.pixelSize: Style.topLinePixelSize\r
icon.source: appIconUrl\r
+ width: contentItem.implicitWidth + leftPadding + rightPadding\r
onTriggered: appsMenuModelBackend.openAppUrl(appUrl)\r
}\r
}\r