From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Wed, 15 Jan 2020 18:15:25 +0000 (+0100) Subject: Allow text to expand further if one or both buttons aren't visible X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~413^2~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9b32ebdae47ad65ce1f6cdfcae395373d29f8785;p=nextcloud-desktop.git Allow text to expand further if one or both buttons aren't visible Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index d16faadda..9a2403982 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -512,7 +512,7 @@ Window { Text { id: activityTextTitle text: (type === "Activity") ? subject : message - width: 236 + width: 240 + ((path === "") ? activityItem.height : 0) + ((link === "") ? activityItem.height : 0) - 8 elide: Text.ElideRight font.pixelSize: 12 } @@ -521,7 +521,7 @@ Window { id: activityTextInfo text: displaypath height: (displaypath === "") ? 0 : activityTextTitle.height - width: 236 + width: 240 + ((path === "") ? activityItem.height : 0) + ((link === "") ? activityItem.height : 0) - 8 elide: Text.ElideRight font.pixelSize: 10 } @@ -532,12 +532,12 @@ Window { } Button { id: activityButton1 - Layout.preferredWidth: activityItem.height + Layout.preferredWidth: (path === "") ? 0 : activityItem.height Layout.preferredHeight: activityItem.height Layout.alignment: Qt.AlignRight flat: true hoverEnabled: false - visible: (path !== "") ? true : false + visible: (path === "") ? false : true display: AbstractButton.IconOnly icon.source: "qrc:///client/resources/files.svg" icon.color: "transparent" @@ -547,12 +547,13 @@ Window { } } Button { - Layout.preferredWidth: activityItem.height - Layout.preferredHeight: activityItem.height + id: activityButton2 + Layout.preferredWidth: (link === "") ? 0 : activityItem.height + Layout.preferredHeight: activityItem.height Layout.alignment: Qt.AlignRight flat: true hoverEnabled: false - visible: (link !== "") ? true : false + visible: (link === "") ? false : true display: AbstractButton.IconOnly icon.source: "qrc:///client/resources/public.svg" icon.color: "transparent"