export defaultIconSize
kept in sync with the kglobal desktop icon size
This commit is contained in:
parent
e6053a71dd
commit
7da705ba8a
@ -153,7 +153,10 @@ QSize FontProxy::mSize() const
|
|||||||
ThemeProxy::ThemeProxy(QObject *parent)
|
ThemeProxy::ThemeProxy(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
|
m_defaultIconSize = KIconLoader::global()->currentSize(KIconLoader::Desktop);
|
||||||
|
|
||||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SIGNAL(themeChanged()));
|
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SIGNAL(themeChanged()));
|
||||||
|
connect(KIconLoader::global(), SIGNAL(iconLoaderSettingsChanged()), this, SLOT(iconLoaderSettingsChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeProxy::~ThemeProxy()
|
ThemeProxy::~ThemeProxy()
|
||||||
@ -305,5 +308,21 @@ int ThemeProxy::enormousIconSize() const
|
|||||||
return KIconLoader::SizeEnormous;
|
return KIconLoader::SizeEnormous;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ThemeProxy::iconLoaderSettingsChanged()
|
||||||
|
{
|
||||||
|
if (m_defaultIconSize == KIconLoader::global()->currentSize(KIconLoader::Desktop)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_defaultIconSize = KIconLoader::global()->currentSize(KIconLoader::Desktop);
|
||||||
|
|
||||||
|
emit defaultIconSizeChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
int ThemeProxy::defaultIconSize() const
|
||||||
|
{
|
||||||
|
return m_defaultIconSize;
|
||||||
|
}
|
||||||
|
|
||||||
#include "theme.moc"
|
#include "theme.moc"
|
||||||
|
|
||||||
|
@ -202,6 +202,7 @@ class ThemeProxy : public QObject
|
|||||||
Q_PROPERTY(int largeIconSize READ largeIconSize CONSTANT)
|
Q_PROPERTY(int largeIconSize READ largeIconSize CONSTANT)
|
||||||
Q_PROPERTY(int hugeIconSize READ hugeIconSize CONSTANT)
|
Q_PROPERTY(int hugeIconSize READ hugeIconSize CONSTANT)
|
||||||
Q_PROPERTY(int enormousIconSize READ enormousIconSize CONSTANT)
|
Q_PROPERTY(int enormousIconSize READ enormousIconSize CONSTANT)
|
||||||
|
Q_PROPERTY(int defaultIconSize READ defaultIconSize NOTIFY defaultIconSizeChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ThemeProxy(QObject *parent = 0);
|
ThemeProxy(QObject *parent = 0);
|
||||||
@ -238,9 +239,17 @@ public:
|
|||||||
int largeIconSize() const;
|
int largeIconSize() const;
|
||||||
int hugeIconSize() const;
|
int hugeIconSize() const;
|
||||||
int enormousIconSize() const;
|
int enormousIconSize() const;
|
||||||
|
int defaultIconSize() const;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void iconLoaderSettingsChanged();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void themeChanged();
|
void themeChanged();
|
||||||
|
void defaultIconSizeChanged();
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_defaultIconSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user