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

[applet] Port to Kirigami.PlaceholderMessage

This patch ports the Vaults applet to use the new `Kirigami.PlaceholderMessage` that was
just created to standardize the appearance of placeholder messages.

This requires adding Kirigami as a dependency.

Test Plan:

No change when there is at least one vault set up

Reviewers: #vdg, #plasma, ivan, niccolove

Reviewed By: #plasma, ivan

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T13021

Differential Revision:
parent 290da0c9
......@@ -66,6 +66,12 @@ if (KF5NetworkManagerQt_FOUND)
find_package (KF5SysGuard REQUIRED)
find_package(KF5Kirigami2 ${KF5_DEP_VERSION} CONFIG)
set_package_properties(KF5Kirigami2 PROPERTIES
DESCRIPTION "A QtQuick based components set"
include_directories (
......@@ -18,13 +18,16 @@
* along with this program. If not, see <>.
import QtQuick 2.1
import QtQuick 2.4
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kirigami 2.12 as Kirigami
Item {
property var vaultsModel: plasmoid.nativeInterface.vaultsModel
property var vaultsModelActions: plasmoid.nativeInterface.vaultsModel.actionsModel()
......@@ -72,19 +75,38 @@ Item {
highlightResizeDuration: units.longDuration
delegate: VaultItem {}
visible: count > 0
interactive: false
Kirigami.PlaceholderMessage {
id: noVaultsMessage
anchors.centerIn: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: units.largeSpacing
visible: vaultsList.count === 0
text: i18nd("plasmavault-kde", "No Vaults have been set up")
helpfulAction: Action {
text: i18nd("plasmavault-kde", "Create a New Vault...") "list-add"
onTriggered: vaultsModelActions.requestNewVault()
PlasmaComponents.Button {
id: buttonCreateNewVault
visible: vaultsList.count > 0
text: i18nd("plasmavault-kde", "Create a New Vault...")
iconSource: "list-add"
onClicked: vaultsModelActions.requestNewVault()
Layout.alignment: vaultsList.visible ? Qt.AlignLeft : Qt.AlignCenter
Layout.alignment: Qt.AlignLeft
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