From a51cbf7b9e9a72e193d45f0ca248de3376b5bcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 11 Mar 2014 15:03:36 +0100 Subject: [PATCH] [kwin/kcmdeco] Show an information if close window by dbl click gets activated The option changes the behavior of the menu button, thus we should point out to the user that the behavior changes. This is only done for Auroae configurations as other decorations have to take care about it themselves. CCBUG: 331462 REVIEW: 116715 --- kcmkwin/kwindecoration/auroraeconfig.ui | 10 ++++++++++ kcmkwin/kwindecoration/kwindecoration.cpp | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/kcmkwin/kwindecoration/auroraeconfig.ui b/kcmkwin/kwindecoration/auroraeconfig.ui index 168709b0e4..cac3d0984c 100644 --- a/kcmkwin/kwindecoration/auroraeconfig.ui +++ b/kcmkwin/kwindecoration/auroraeconfig.ui @@ -11,6 +11,10 @@ + + + + @@ -131,6 +135,12 @@ QComboBox
kcombobox.h
+ + KMessageWidget + QFrame +
kmessagewidget.h
+ 1 +
diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 83fef1097d..c5ecd6810c 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -380,6 +380,15 @@ void KWinDecorationModule::slotConfigureDecoration() form->borderSizesCombo->setCurrentIndex(index.data(DecorationModel::BorderSizeRole).toInt()); form->buttonSizesCombo->setCurrentIndex(index.data(DecorationModel::ButtonSizeRole).toInt()); form->closeWindowsDoubleClick->setChecked(index.data(DecorationModel::CloseOnDblClickRole).toBool()); + form->doubleClickMessage->setCloseButtonVisible(true); + form->doubleClickMessage->setText(i18n("Close by double clicking:\n To open the menu, keep the button pressed until it appears.")); + form->doubleClickMessage->setVisible(false); + connect(form->closeWindowsDoubleClick, &QCheckBox::toggled, [form](bool toggled) { + if (!toggled) { + return; + } + form->doubleClickMessage->animatedShow(); + }); // in case of QmlDecoration look for a config.ui in the package structure KConfigDialogManager *configManager = nullptr; if (index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::QmlDecoration) {