From 5d5cf7c1dde93d9ce3eeb2c879c671178898e2a9 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Sun, 6 Mar 2011 14:40:13 +0100 Subject: [PATCH] Usability fixes Make the edit area disabled until the user selects he wants custom positions. Its a source of confusion if the user can edit the positions but doesn't see anything happen in his decorations upon apply. This gives immediate feedback that the checkbox should be enabled. Conflicts: kwin/kcmkwin/kwindecoration/buttonsconfigdialog.cpp --- kcmkwin/kwindecoration/buttons.ui | 28 +++++++++++++++++-- .../kwindecoration/buttonsconfigdialog.cpp | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwindecoration/buttons.ui b/kcmkwin/kwindecoration/buttons.ui index 73f0b1a4df..037debfb37 100644 --- a/kcmkwin/kwindecoration/buttons.ui +++ b/kcmkwin/kwindecoration/buttons.ui @@ -11,6 +11,9 @@ + + 0 + @@ -32,7 +35,11 @@ - + + + false + + @@ -45,5 +52,22 @@ - + + + useCustomButtonPositionsCheckBox + clicked(bool) + buttonPositionWidget + setEnabled(bool) + + + 205 + 39 + + + 231 + 90 + + + + diff --git a/kcmkwin/kwindecoration/buttonsconfigdialog.cpp b/kcmkwin/kwindecoration/buttonsconfigdialog.cpp index 96cee70053..f1eaa8f076 100644 --- a/kcmkwin/kwindecoration/buttonsconfigdialog.cpp +++ b/kcmkwin/kwindecoration/buttonsconfigdialog.cpp @@ -45,7 +45,7 @@ KWinDecorationButtonsConfigDialog::KWinDecorationButtonsConfigDialog(bool custom setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default | KDialog::Reset); enableButton(KDialog::Reset, false); QVBoxLayout* layout = new QVBoxLayout; - layout->addWidget(m_ui); + m_ui->buttonPositionWidget->setEnabled(customPositions); QWidget* main = new QWidget(this); main->setLayout(layout);