From: Claudio Cambra Date: Wed, 12 Apr 2023 04:11:33 +0000 (+0800) Subject: Fix layout of tags with differing sizes and oversized tags X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~10^2~49^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e2bd9e69e1afee57264741f7abfc1480c123fcb8;p=nextcloud-desktop.git Fix layout of tags with differing sizes and oversized tags Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filedetails/FileDetailsPage.qml b/src/gui/filedetails/FileDetailsPage.qml index 1982beffb..ff43acb04 100644 --- a/src/gui/filedetails/FileDetailsPage.qml +++ b/src/gui/filedetails/FileDetailsPage.qml @@ -167,7 +167,7 @@ Page { visible: headerGridLayout.showFileLockedString } - RowLayout { + Row { id: tagRow Layout.fillWidth: true @@ -177,9 +177,14 @@ Page { id: tagRepeater readonly property var fileTagModel: root.fileDetails.fileTagModel + readonly property int maxTags: 3 model: fileTagModel delegate: FileTag { + readonly property int availableLayoutSpace: tagRow.width - tagRow.spacing - overflowTag.width + readonly property int maxWidth: (availableLayoutSpace / tagRepeater.maxTags) - tagRow.spacing + + width: Math.min(maxWidth, implicitWidth) text: model.display }