mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-23 13:07:21 +02:00
[ui] Homepage: Add QML elide to projects' labels and align them correctly
This commit is contained in:
parent
52c6bb7c46
commit
e8eeccded1
1 changed files with 4 additions and 10 deletions
|
@ -356,18 +356,12 @@ Page {
|
|||
}
|
||||
Label {
|
||||
id: project
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.horizontalCenter: projectDelegate.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: projectDelegate.width
|
||||
wrapMode: Text.WrapAnywhere
|
||||
text: {
|
||||
if (Filepath.removeExtension(Filepath.basename(modelData["path"])).length > 40) {
|
||||
var length = Filepath.basename(modelData["path"]).length
|
||||
return Filepath.basename(modelData["path"]).substring(0, 30) + "…" + Filepath.basename(modelData["path"]).substring(length - 10, length)
|
||||
} else {
|
||||
return Filepath.basename(modelData["path"])
|
||||
}
|
||||
}
|
||||
elide: Text.ElideMiddle
|
||||
text: Filepath.basename(modelData["path"])
|
||||
maximumLineCount: 1
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue