[aurorae] Fix setting closeOnDoubleClickOnMenuButton

It's now a setting provided by DecorationSettings and doesn't need
to be configured per theme.
This commit is contained in:
Martin Gräßlin 2014-12-05 16:43:13 +01:00
parent 521627396f
commit 65fd014fdb
2 changed files with 2 additions and 10 deletions

View file

@ -294,6 +294,7 @@ void Decoration::init()
QQmlContext *context = new QQmlContext(Helper::instance().rootContext(), this);
context->setContextProperty(QStringLiteral("decoration"), this);
context->setContextProperty(QStringLiteral("decorationSettings"), s.data());
auto component = Helper::instance().component(m_themeName);
if (!component) {
return;

View file

@ -19,7 +19,7 @@ import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
import org.kde.kwin.decoration 0.1
DecorationButton {
property bool closeOnDoubleClick: false
property bool closeOnDoubleClick: decorationSettings.closeOnDoubleClickOnMenu
id: menuButton
buttonType: DecorationOptions.DecorationButtonMenu
KQuickControlsAddons.QIconItem {
@ -74,13 +74,4 @@ DecorationButton {
}
}
}
Component.onCompleted: {
menuButton.closeOnDoubleClick = decoration.readConfig("CloseOnDoubleClickMenuButton", false);
}
Connections {
target: decoration
onConfigChanged: {
menuButton.closeOnDoubleClick = decoration.readConfig("CloseOnDoubleClickMenuButton", false);
}
}
}