Commit ab9209da authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Enabled elide for entries in file list in FileDialogue.

parent 71525d5c
......@@ -39,6 +39,9 @@ Dialog {
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
height: parent.height / 2
width: parent.width / 2
signal finished(string path)
property int selectedFileIndex: -1
......@@ -141,8 +144,11 @@ Dialog {
}
ListView {
width: root.parent.width / 2
height: root.parent.height / 2
id: fileList
/* Fill remaining space with the list content. */
Layout.fillHeight: true
Layout.fillWidth: true
FolderListModel {
id: folderModel
......@@ -163,10 +169,15 @@ Dialog {
Rectangle {
color: (index == selectedFileIndex) ? datovkaPalette.highlight : "#00000000"
width: childrenRect.width
width: fileList.width
height: childrenRect.height
Text {
anchors {
left: parent.left;
right: parent.right;
}
elide: Text.ElideRight
/* Add '>' to directory names. */
text: fileName + (fileIsDir ? " >" : "")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment