Commit 24f27f47 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Make "There are no accounts configured" view a bit more consistent

We're slowly ambling towards putting the "add new thing" button right in the middle of
the view itself when there are no things configured--right below the message. The Vaults
applet does this for example, and at least one other thing that I can't remember right

The button moves to the bottom-right corner under the view when the view shows at least
one item.

The explanatory string is also tweaked slightly to reflect the new view, and made into a
level 3 Kirigami heading like other similar messages.

Test Plan: {F8174853}

Reviewers: #vdg, #plasma, leinir, bshah

Reviewed By: #plasma, bshah

Subscribers: bshah

Differential Revision:
parent fa90358c
......@@ -77,15 +77,27 @@ ScrollViewKCM {
onClicked: kcm.push("AccountDetails.qml", {model:})
Controls.Label {
ColumnLayout {
id: noAccountsLayout
visible: view.count === 0
anchors.fill: parent
clip: true
enabled: false
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.Wrap
text: i18nc("A text shown when a user has not yet added any accounts", "You have not added any accounts yet.\n\nClick on \"Add New Account...\" below to do so.")
anchors.centerIn: parent
width: parent.width
spacing: Kirigami.Units.gridUnit
Kirigami.Heading {
enabled: false
Layout.maximumWidth: parent.width
Layout.alignment: Qt.AlignHCenter
level: 3
wrapMode: Text.Wrap
text: i18nc("A text shown when a user has not yet added any accounts", "No accounts added yet")
Controls.Button {
Layout.alignment: Qt.AlignHCenter
text: i18n("Add New Account...") "contact-new"
onClicked: kcm.push("AvailableAccounts.qml")
......@@ -96,6 +108,7 @@ ScrollViewKCM {
footer: RowLayout {
Controls.Button {
visible: !noAccountsLayout.visible
Layout.alignment: Qt.AlignRight
text: i18n("Add New Account...") "contact-new"
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