set the applet as expanded on activate signal

This commit is contained in:
Marco Martin 2014-02-14 14:26:53 +01:00
parent ad54cc0187
commit 54549d8312

View File

@ -72,6 +72,14 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
connect(applet(), &Plasma::Applet::statusChanged, connect(applet(), &Plasma::Applet::statusChanged,
this, &AppletInterface::statusChanged); this, &AppletInterface::statusChanged);
connect(applet(), &Plasma::Applet::activate,
[=] () {
setExpanded(true);
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
i->forceActiveFocus(Qt::ShortcutFocusReason);
}
});
connect(appletScript(), &DeclarativeAppletScript::formFactorChanged, connect(appletScript(), &DeclarativeAppletScript::formFactorChanged,
this, &AppletInterface::formFactorChanged); this, &AppletInterface::formFactorChanged);
connect(appletScript(), &DeclarativeAppletScript::locationChanged, connect(appletScript(), &DeclarativeAppletScript::locationChanged,