Show a label when no posts are found
This commit is contained in:
parent
c740558ca4
commit
b5153b00b1
1 changed files with 20 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue