Group :: System/Libraries
RPM: kf5-plasma-framework
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: alt-def-theme-wallpaper.patch
Download
Download
--- a/src/plasma/theme.cpp~ 2015-12-30 14:17:28.187000000 +0300
+++ b/src/plasma/theme.cpp 2015-12-30 14:26:23.802000000 +0300
@@ -8,6 +8,8 @@
#include "private/svg_p.h"
#include "private/theme_p.h"
+#include <unistd.h>
+
#include <QFile>
#include <QFileInfo>
#include <QFontDatabase>
@@ -184,6 +186,10 @@ QPalette Theme::globalPalette()
QString Theme::wallpaperPath(const QSize &size) const
{
+ if( getuid() == 0 ) {
+ return QLatin1String("/usr/share/design/current/backgrounds/root.png");
+ }
+
QString fullPath;
QString image = d->defaultWallpaperTheme + QStringLiteral("/contents/images/%1x%2") + d->defaultWallpaperSuffix;
QString defaultImage = image.arg(d->defaultWallpaperWidth).arg(d->defaultWallpaperHeight);
@@ -221,6 +227,9 @@ QString Theme::wallpaperPath(const QSize
// the standard directories
// qCDebug(LOG_PLASMA) << "looking for" << defaultImage;
fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + defaultImage);
+ if (fullPath.isEmpty()) {
+ fullPath = QLatin1String("/usr/share/design/current/backgrounds/default.png");
+ }
}
return fullPath;