mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +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
|
visible: headerGridLayout.showFileLockedString
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Row {
|
||||||
id: tagRow
|
id: tagRow
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -177,9 +177,14 @@ Page {
|
||||||
id: tagRepeater
|
id: tagRepeater
|
||||||
|
|
||||||
readonly property var fileTagModel: root.fileDetails.fileTagModel
|
readonly property var fileTagModel: root.fileDetails.fileTagModel
|
||||||
|
readonly property int maxTags: 3
|
||||||
|
|
||||||
model: fileTagModel
|
model: fileTagModel
|
||||||
delegate: FileTag {
|
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
|
text: model.display
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue