From 01bf9c93349165989b03c4a9a54443e2942e9824 Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Fri, 4 Feb 2005 11:38:37 +0000 Subject: [PATCH] Inspired by Knut Johansson's patch: Fix the decoration preview of decorations like Quartz and Web when custom button positions get disabled. They rely on titleButtonsLeft()/Right() returning the default value described in the API docs. svn path=/trunk/kdebase/kwin/; revision=386102 --- kcmkwin/kwindecoration/preview.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index e8e9cb5711..29e9fa7e21 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -458,10 +458,15 @@ unsigned long KDecorationPreviewOptions::updateSettings() d->border_size = customBorderSize; if (customButtonsChanged) d->custom_button_positions = customButtons; - if (!customTitleButtonsLeft.isNull() ) - d->title_buttons_left = customTitleButtonsLeft; - if (!customTitleButtonsRight.isNull() ) - d->title_buttons_right = customTitleButtonsRight; + if (customButtons) { + if (!customTitleButtonsLeft.isNull() ) + d->title_buttons_left = customTitleButtonsLeft; + if (!customTitleButtonsRight.isNull() ) + d->title_buttons_right = customTitleButtonsRight; + } else { + d->title_buttons_left = "MS"; + d->title_buttons_right = "HIAX"; + } return changed; }