Part Revert "[Units] Make iconSizes property constant"
Summary: Though we can make the property constant, some applications still use the signal (for example FolderView.qml) to know that one of the icons has changed sizes and do some processing. Whilst it would be possible to fix folderview, we should avoid public API changes. Reviewers: #plasma, #frameworks Subscribers: plasma-devel Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D4092
This commit is contained in:
parent
31cd81ca53
commit
66ebf2c84f
@ -134,6 +134,8 @@ void Units::iconLoaderSettingsChanged()
|
|||||||
m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge));
|
m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge));
|
||||||
m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge));
|
m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge));
|
||||||
m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous));
|
m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous));
|
||||||
|
|
||||||
|
emit iconSizesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QQmlPropertyMap *Units::iconSizes() const
|
QQmlPropertyMap *Units::iconSizes() const
|
||||||
|
@ -73,7 +73,10 @@ class Units : public QObject
|
|||||||
*
|
*
|
||||||
* Not devicePixelRation-adjusted::
|
* Not devicePixelRation-adjusted::
|
||||||
* * desktop
|
* * desktop
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
//note the iconSizeChanges signal indicates that one (or more) of these icons have changed
|
||||||
|
//but the property map itself remains constant
|
||||||
Q_PROPERTY(QQmlPropertyMap *iconSizes READ iconSizes CONSTANT)
|
Q_PROPERTY(QQmlPropertyMap *iconSizes READ iconSizes CONSTANT)
|
||||||
|
|
||||||
// layout hints
|
// layout hints
|
||||||
@ -176,6 +179,7 @@ public:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void devicePixelRatioChanged();
|
void devicePixelRatioChanged();
|
||||||
void gridUnitChanged();
|
void gridUnitChanged();
|
||||||
|
void iconSizesChanged();
|
||||||
void spacingChanged();
|
void spacingChanged();
|
||||||
void durationChanged();
|
void durationChanged();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user