From 65fd014fdb6948b10af63591763bdc5248adeac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 5 Dec 2014 16:43:13 +0100 Subject: [PATCH] [aurorae] Fix setting closeOnDoubleClickOnMenuButton It's now a setting provided by DecorationSettings and doesn't need to be configured per theme. --- clients/aurorae/src/aurorae.cpp | 1 + clients/aurorae/src/qml/MenuButton.qml | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 234203aa5a..0a5b49edcb 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -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; diff --git a/clients/aurorae/src/qml/MenuButton.qml b/clients/aurorae/src/qml/MenuButton.qml index c22d379227..bd56f50922 100644 --- a/clients/aurorae/src/qml/MenuButton.qml +++ b/clients/aurorae/src/qml/MenuButton.qml @@ -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); - } - } }