Commit b3893b51 authored by Nate Graham's avatar Nate Graham 💤
Browse files

Don't allow view's loading indicator and placeholder message to overlap

BUG: 424918
FIXED-IN: 20.12
parent 5b0915d9
Pipeline #40469 canceled with stage
...@@ -91,6 +91,8 @@ FocusScope { ...@@ -91,6 +91,8 @@ FocusScope {
onOpen: viewManager.openChildView(fullData) onOpen: viewManager.openChildView(fullData)
suppressNoDataPlaceholderMessage: busyIndicatorLoader.active
onGoBackRequested: { onGoBackRequested: {
viewManager.goBack() viewManager.goBack()
} }
......
...@@ -221,7 +221,10 @@ FocusScope { ...@@ -221,7 +221,10 @@ FocusScope {
onGoBackRequested: viewManager.goBack() onGoBackRequested: viewManager.goBack()
suppressNoDataPlaceholderMessage: busyIndicatorLoader.active
Loader { Loader {
id: busyIndicatorLoader
anchors.centerIn: parent anchors.centerIn: parent
height: Kirigami.Units.gridUnit * 5 height: Kirigami.Units.gridUnit * 5
width: height width: height
......
...@@ -34,6 +34,7 @@ FocusScope { ...@@ -34,6 +34,7 @@ FocusScope {
property url defaultIcon property url defaultIcon
property int depth: 1 property int depth: 1
property alias viewManager: navigationBar.viewManager property alias viewManager: navigationBar.viewManager
property bool suppressNoDataPlaceholderMessage: false
signal enqueue(var fullData, string name) signal enqueue(var fullData, string name)
signal replaceAndPlay(var fullData, string name) signal replaceAndPlay(var fullData, string name)
...@@ -208,7 +209,7 @@ FocusScope { ...@@ -208,7 +209,7 @@ FocusScope {
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4) width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 visible: contentDirectoryView.count === 0 && !suppressNoDataPlaceholderMessage
text: i18n("Nothing to display") text: i18n("Nothing to display")
} }
......
...@@ -42,6 +42,7 @@ FocusScope { ...@@ -42,6 +42,7 @@ FocusScope {
property alias navigationBar: navigationBar property alias navigationBar: navigationBar
property int depth: 1 property int depth: 1
property alias viewManager: navigationBar.viewManager property alias viewManager: navigationBar.viewManager
property bool suppressNoDataPlaceholderMessage: false
signal goBackRequested() signal goBackRequested()
signal showArtist(var name) signal showArtist(var name)
...@@ -181,7 +182,7 @@ FocusScope { ...@@ -181,7 +182,7 @@ FocusScope {
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4) width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 visible: contentDirectoryView.count === 0 && !suppressNoDataPlaceholderMessage
text: i18n("Nothing to display") text: i18n("Nothing to display")
} }
......
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