Commit da4ce186 authored by Nate Graham's avatar Nate Graham
Browse files

DataGridView/DataListView: put placeholder messages in Loaders

parent a8ae266b
......@@ -245,13 +245,6 @@ FocusScope {
Accessible.role: Accessible.List
Accessible.name: mainTitle
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 && !busyIndicatorLoader.active
text: i18n("Nothing to display")
}
cellWidth: {
let columns = Math.max(Math.floor(scrollView.availableSpace / elisaTheme.gridDelegateSize), 2);
return Math.floor(scrollView.availableSpace / columns);
......@@ -284,6 +277,18 @@ FocusScope {
}
// "Nothing here" placeholder message
Loader {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
active: contentDirectoryView.count === 0 && !busyIndicatorLoader.active
sourceComponent: Kirigami.PlaceholderMessage {
anchors.centerIn: parent
text: i18n("Nothing to display")
}
}
Connections {
target: ElisaApplication
......
......@@ -294,13 +294,6 @@ FocusScope {
width: contentDirectoryView.width
}
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 && !busyIndicatorLoader.active
text: i18n("Nothing to display")
}
onCountChanged: if (count === 0) {
currentIndex = -1;
}
......@@ -325,6 +318,18 @@ FocusScope {
}
// "Nothing here" placeholder message
Loader {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
active: contentDirectoryView.count === 0 && !busyIndicatorLoader.active
sourceComponent: Kirigami.PlaceholderMessage {
anchors.centerIn: parent
text: i18n("Nothing to display")
}
}
Connections {
target: ElisaApplication
......
Supports Markdown
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