[aurorae] Fix setting closeOnDoubleClickOnMenuButton
It's now a setting provided by DecorationSettings and doesn't need to be configured per theme.icc-effect-5.14.5
parent
521627396f
commit
65fd014fdb
|
@ -294,6 +294,7 @@ void Decoration::init()
|
||||||
|
|
||||||
QQmlContext *context = new QQmlContext(Helper::instance().rootContext(), this);
|
QQmlContext *context = new QQmlContext(Helper::instance().rootContext(), this);
|
||||||
context->setContextProperty(QStringLiteral("decoration"), this);
|
context->setContextProperty(QStringLiteral("decoration"), this);
|
||||||
|
context->setContextProperty(QStringLiteral("decorationSettings"), s.data());
|
||||||
auto component = Helper::instance().component(m_themeName);
|
auto component = Helper::instance().component(m_themeName);
|
||||||
if (!component) {
|
if (!component) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
|
||||||
import org.kde.kwin.decoration 0.1
|
import org.kde.kwin.decoration 0.1
|
||||||
|
|
||||||
DecorationButton {
|
DecorationButton {
|
||||||
property bool closeOnDoubleClick: false
|
property bool closeOnDoubleClick: decorationSettings.closeOnDoubleClickOnMenu
|
||||||
id: menuButton
|
id: menuButton
|
||||||
buttonType: DecorationOptions.DecorationButtonMenu
|
buttonType: DecorationOptions.DecorationButtonMenu
|
||||||
KQuickControlsAddons.QIconItem {
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue