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