mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Fix layout of tags with differing sizes and oversized tags
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
65e7f6da9c
commit
e2bd9e69e1
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue