From: Stephan Beyer Date: Sat, 6 Jun 2020 21:55:31 +0000 (+0200) Subject: Change width of app menu X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~170 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2946c335ba443983a6018ca0f9ba9745d5e1c44a;p=nextcloud-desktop.git Change width of app menu 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 --- diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index d8fa79dc4..3f23cad56 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -459,7 +459,7 @@ Window { Menu { id: appsMenu y: (trayWindowAppsButton.y + trayWindowAppsButton.height + 2) - width: (Style.headerButtonIconSize * 3) + width: Math.min(contentItem.childrenRect.width + 4, Style.trayWindowWidth / 2) closePolicy: "CloseOnPressOutside" background: Rectangle { @@ -476,6 +476,7 @@ Window { text: appName font.pixelSize: Style.topLinePixelSize icon.source: appIconUrl + width: contentItem.implicitWidth + leftPadding + rightPadding onTriggered: appsMenuModelBackend.openAppUrl(appUrl) } }