Commit 24c3da41 authored by Nate Graham's avatar Nate Graham 🔩

Port BrowsingPage to PlaceholderMessage

Summary:
While I'm stuck with https://bugs.kde.org/show_bug.cgi?id=420324, I might as well make
the spurious "no network connectivity" message prettier and more standardized by using the
new Kirigami cimponent introduced in D29057.

Depends on D29057

Test Plan: {F8251669}

Reviewers: #vdg, #discover_software_store, apol

Reviewed By: #discover_software_store, apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29059
parent 100b0894
......@@ -5,7 +5,7 @@ set(PROJECT_VERSION_MAJOR 5)
cmake_minimum_required(VERSION 2.8.12)
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.69.0")
set(KF5_MIN_VERSION "5.70.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......
......@@ -18,12 +18,12 @@
*/
import QtQuick 2.4
import QtQuick.Controls 2.1
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.1
import org.kde.discover 2.0
import org.kde.discover.app 1.0
import "navigation.js" as Navigation
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.12 as Kirigami
DiscoverPage
{
......@@ -50,6 +50,18 @@ DiscoverPage
visible: apps.count === 0 && apps.model.isFetching
}
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: Kirigami.Units.largeSpacing
visible: apps.count === 0 && !apps.model.isFetching
icon.name: "network-disconnect"
text: xi18nc("@info", "Unable to load applications.<nl/>Please verify Internet connectivity.")
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
Kirigami.Theme.colorSet: Kirigami.Theme.Window
......@@ -68,24 +80,5 @@ DiscoverPage
application: model.application
compact: page.compact
}
footer: ColumnLayout {
visible: apps.count === 0 && !apps.model.isFetching
width: parent.width
Kirigami.Icon {
source: "network-disconnect"
Layout.alignment: Qt.AlignHCenter
width: Kirigami.Units.gridUnit * 4
height: width
}
Kirigami.Heading {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
text: xi18nc("@info", "Unable to load applications.<nl/>Please verify Internet connectivity.")
level: 3
}
}
}
}
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