wallpaperForSize moves to Plasma::Theme
This commit is contained in:
parent
cf049f28cb
commit
374d230932
@ -48,11 +48,6 @@ ThemeProxy::~ThemeProxy()
|
||||
{
|
||||
}
|
||||
|
||||
QString ThemeProxy::wallpaperPathForSize(int width, int height) const
|
||||
{
|
||||
return Plasma::Theme::wallpaperPath(QSize(width, height));
|
||||
}
|
||||
|
||||
void ThemeProxy::iconLoaderSettingsChanged()
|
||||
{
|
||||
m_iconSizes->insert("desktop", QVariant(KIconLoader::global()->currentSize(KIconLoader::Desktop)));
|
||||
|
@ -51,16 +51,10 @@ class ThemeProxy : public Plasma::Theme
|
||||
*/
|
||||
Q_PROPERTY(QQmlPropertyMap *iconSizes READ iconSizes NOTIFY iconSizesChanged)
|
||||
|
||||
// layout hints
|
||||
Q_PROPERTY(int smallSpacing READ smallSpacing CONSTANT)
|
||||
Q_PROPERTY(int largeSpacing READ largeSpacing CONSTANT)
|
||||
|
||||
public:
|
||||
ThemeProxy(QQmlEngine *parent = 0);
|
||||
~ThemeProxy();
|
||||
|
||||
Q_INVOKABLE QString wallpaperPathForSize(int width=-1, int height=-1) const;
|
||||
|
||||
QQmlPropertyMap *iconSizes() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
@ -71,8 +65,6 @@ Q_SIGNALS:
|
||||
void iconSizesChanged();
|
||||
|
||||
private:
|
||||
int m_smallSpacing;
|
||||
int m_largeSpacing;
|
||||
QQmlPropertyMap *m_iconSizes;
|
||||
QQmlEngine *m_engine;
|
||||
};
|
||||
|
@ -256,6 +256,11 @@ QString Theme::wallpaperPath(const QSize &size) const
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
QString Theme::wallpaperPathForSize(int width, int height) const
|
||||
{
|
||||
return Plasma::Theme::wallpaperPath(QSize(width, height));
|
||||
}
|
||||
|
||||
bool Theme::currentThemeHasImage(const QString &name) const
|
||||
{
|
||||
if (name.contains("../")) {
|
||||
|
@ -90,6 +90,9 @@ class PLASMA_EXPORT Theme : public QObject
|
||||
Q_PROPERTY(int enormousIconSize READ enormousIconSize CONSTANT)
|
||||
Q_PROPERTY(int defaultIconSize READ defaultIconSize NOTIFY defaultIconSizeChanged)
|
||||
|
||||
// layout hints
|
||||
Q_PROPERTY(int smallSpacing READ smallSpacing CONSTANT)
|
||||
Q_PROPERTY(int largeSpacing READ largeSpacing CONSTANT)
|
||||
|
||||
public:
|
||||
enum ColorRole {
|
||||
@ -153,6 +156,8 @@ class PLASMA_EXPORT Theme : public QObject
|
||||
*/
|
||||
QString wallpaperPath(const QSize &size = QSize()) const;
|
||||
|
||||
Q_INVOKABLE QString wallpaperPathForSize(int width=-1, int height=-1) const;
|
||||
|
||||
/**
|
||||
* Checks if this theme has an image named in a certain way
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user