[image wallpaper] Show wallpaper title/filename on grid view delegates

Summary:
This patch makes the wallpaper chooser grid view delegates show the wallpaper's
title (if it has a desktop file) or filename (if it doesn't). Authorship information
is shown via a tooltip, if present.

Test Plan:
{F6587535, size=full}
{F6587536, size=full}

Reviewers: #vdg, #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18737
wilder-broken-krunner
Nate Graham 7 years ago
parent dbb19ba333
commit d307f6879d
  1. 4
      wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml

@ -32,8 +32,10 @@ KCM.GridDelegate {
property alias color: backgroundRect.color
property bool selected: (wallpapersGrid.currentIndex == index)
opacity: model.pendingDeletion ? 0.5 : 1
text: model.display
toolTip: model.author.length > 0 ? i18nd("plasma_wallpaper_org.kde.image", "%1 by %2", model.display, model.author) : model.display
toolTip: model.author.length > 0 ? i18nd("plasma_wallpaper_org.kde.image", "By %1", model.author) : ""
hoverEnabled: true

Loading…
Cancel
Save