Show a label when no posts are found

This commit is contained in:
Luca Beltrame 2015-08-10 12:42:17 +02:00
parent c740558ca4
commit b5153b00b1

View file

@ -48,11 +48,17 @@ Rectangle {
}
onDownloadFinished: {
grid.opacity = 1
runningIndicator.running = false
if (danbooruModel.rowCount() == 0) {
warnLabel.visible = true
}
}
onDownloadStarted: {
warnLabel.visible = false
grid.opacity = 0.5
runningIndicator.running = true
}
@ -67,6 +73,20 @@ Rectangle {
running: false
}
Label {
id: warnLabel
z: 1
width: grid.cellWidth / 2
height: grid.cellHeight / 2
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: false
text: "No posts found."
color: black
}
Component {
id: highlight
Rectangle {