From 554399afc79e596672597a18002e366f98de78e5 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 9 Oct 2011 16:12:00 +0200 Subject: [PATCH] a method to fetch custom size wallpapers --- declarativeimports/core/theme.cpp | 5 +++++ declarativeimports/core/theme_p.h | 1 + 2 files changed, 6 insertions(+) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index fd9e15895..eca3d6bfb 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -61,6 +61,11 @@ QString ThemeProxy::wallpaperPath() const return Plasma::Theme::defaultTheme()->wallpaperPath(); } +QString ThemeProxy::wallpaperPathForSize(int width, int height) const +{ + return Plasma::Theme::defaultTheme()->wallpaperPath(QSize(width, height)); +} + QColor ThemeProxy::textColor() const { return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index 008264991..f1178812e 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -63,6 +63,7 @@ public: KUrl homepage() const; bool useGlobalSettings() const; QString wallpaperPath() const; + Q_INVOKABLE QString wallpaperPathForSize(int width=-1, int height=-1) const; QColor textColor() const; QColor highlightColor() const;