Version: 1.6 beta 1 (using KDE KDE 3.5.4) Installed from: Gentoo Packages Compiler: gcc 4.1.1 OS: Linux This dialog always opens with the opacity set to 80%. It should remember the last setting used.
SVN commit 587760 by berger: remember configuration of drop shadow BUG:134563 M +28 -7 dlg_dropshadow.cc --- branches/koffice/1.6/koffice/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.cc #587759:587760 @@ -2,6 +2,7 @@ * dlg_dropshadow.cc - part of KimageShop^WKrayon^WKrita * * Copyright (c) 2005 Michael Thaler <michael.thaler@physik.tu-muenchen.de> + * Copyright (c) 2006 Cyrille Berger <cberger@cberger.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,18 +19,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qradiobutton.h> +#include <qbutton.h> +#include <qbuttongroup.h> #include <qcheckbox.h> -#include <qbuttongroup.h> +#include <qcolor.h> +#include <qcombobox.h> #include <qlabel.h> -#include <qcombobox.h> -#include <qbutton.h> -#include <qcolor.h> +#include <qradiobutton.h> +#include <qslider.h> +#include <kcolorbutton.h> +#include <kconfig.h> +#include <kdebug.h> #include <klocale.h> #include <knuminput.h> -#include <kdebug.h> -#include <kcolorbutton.h> #include "dlg_dropshadow.h" #include "wdg_dropshadow.h" @@ -45,6 +48,16 @@ setMainWidget(m_page); resize(m_page->sizeHint()); + KConfig * cfg = KGlobal::config(); + m_page->xOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_x", 8) ); + m_page->yOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_y", 8) ); + m_page->blurRadiusSpinBox->setValue( cfg->readNumEntry("dropshadow_blurRadius", 5) ); + QColor black(0,0,0); + m_page->shadowColorButton->setColor( cfg->readColorEntry("dropshadow_color", &black) ); + m_page->opacitySlider->setValue( cfg->readNumEntry("dropshadow_opacity", 80 ) ); + m_page->opacitySpinBox->setValue( cfg->readNumEntry("dropshadow_opacity", 80 ) ); + m_page->allowResizingCheckBox->setChecked( cfg->readBoolEntry("dropshadow_resizing", true ) ); + connect(this, SIGNAL(okClicked()), this, SLOT(okClicked())); } @@ -90,6 +103,14 @@ void DlgDropshadow::okClicked() { + KConfig * cfg = KGlobal::config(); + cfg->writeEntry("dropshadow_x", m_page->xOffsetSpinBox->value()); + cfg->writeEntry("dropshadow_y", m_page->yOffsetSpinBox->value()); + cfg->writeEntry("dropshadow_blurRadius", m_page->blurRadiusSpinBox->value()); + cfg->writeEntry("dropshadow_color", m_page->shadowColorButton->color()); + cfg->writeEntry("dropshadow_opacity", m_page->opacitySpinBox->value()); + cfg->writeEntry("dropshadow_resizing", m_page->allowResizingCheckBox->isChecked()); + accept(); }
You need to log in before you can comment on or make changes to this bug.