Recheck which representation we should using in setPreferredRepresentation

Summary:
Appmenu quite neatly has a config option for which should be the
preferred representation, which is needed as both things are quite
viable in a panel and can't be done automatically.

AppletQuickItem needs to update which representation to use when this is
set at runtime. We already check on every single geometry change, so
one extra check won't have a huge impact.

Test Plan:
Appmenu changes dynamically
All other applets (both compact and normal) still seem fine

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3794
This commit is contained in:
David Edmundson 2016-12-23 13:28:32 +00:00
parent 324232a745
commit 2affb1ab56

View File

@ -692,6 +692,7 @@ void AppletQuickItem::setPreferredRepresentation(QQmlComponent *component)
d->preferredRepresentation = component; d->preferredRepresentation = component;
emit preferredRepresentationChanged(component); emit preferredRepresentationChanged(component);
d->compactRepresentationCheck();
} }
bool AppletQuickItem::isExpanded() const bool AppletQuickItem::isExpanded() const