Commit b79f9967 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[wallpapers/image] Add placeholder labels when wallpaper lists are empty

Summary:
Right now, when there are no configured wallpaper slideshow paths or wallpapers in the
slideshow, the list and grid (respectively) are just empty. This patch adds some
placeholder labels to let the user know that it's not broken, just like we do in the
Thunderbolt KCM.

See one `FIXME:` in the code that I could use a hand with.

Test Plan: {F7870947}

Reviewers: #vdg, #plasma, mart

Reviewed By: #vdg, #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26528
parent 02c89d74
......@@ -285,6 +285,18 @@ ColumnLayout {
width: slidePathsView.width
height: paintedHeight;
}
Kirigami.Heading {
anchors.fill: parent
anchors.margins: Kirigami.Units.largeSpacing
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
visible: slidePathsView.count === 0
level: 2
text: i18n("There are no wallpaper locations configured")
opacity: 0.3
}
}
}
Loader {
......@@ -343,6 +355,20 @@ ColumnLayout {
view.delegate: WallpaperDelegate {
color: cfg_Color
}
Kirigami.Heading {
anchors.fill: parent
anchors.margins: Kirigami.Units.largeSpacing
// FIXME: this is needed to vertically center it in the grid for some reason
anchors.topMargin: wallpapersGrid.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
visible: wallpapersGrid.view.count === 0
level: 2
text: i18n("There are no wallpapers in this slideshow")
opacity: 0.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