diff --git a/clients/default/config/config.cpp b/clients/default/config/config.cpp index 881b2736ef..063326eaf7 100644 --- a/clients/default/config/config.cpp +++ b/clients/default/config/config.cpp @@ -12,9 +12,7 @@ #include #include #include -#include #include -#include extern "C" { @@ -35,55 +33,43 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent ) { KGlobal::locale()->insertCatalogue("kwin_default_config"); highcolor = QPixmap::defaultDepth() > 8; + gb = new QGroupBox( 1, Qt::Horizontal, + i18n("Decoration Settings"), parent ); - dummyWidget = new QWidget( parent ); - QVBoxLayout *layout = new QVBoxLayout( dummyWidget ); - layout->setSpacing(KDialog::spacingHint()); - - cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), dummyWidget ); + cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), gb ); QWhatsThis::add( cbShowStipple, i18n("When selected, active titlebars are drawn " "with a stipple (dotted) effect. Otherwise, they are " "drawn without the stipple.")); - layout->addWidget( cbShowStipple ); - - cbShowGrabBar = new QCheckBox( i18n("Draw g&rab bar below windows"), dummyWidget ); + + cbShowGrabBar = new QCheckBox( i18n("Draw g&rab bar below windows"), gb ); QWhatsThis::add( cbShowGrabBar, i18n("When selected, decorations are drawn with a \"grab bar\" " "below windows. Otherwise, no grab bar is drawn.")); - layout->addWidget( cbShowGrabBar ); // Only show the gradient checkbox for highcolor displays if (highcolor) { - cbUseGradients = new QCheckBox( i18n("Draw gr&adients"), dummyWidget ); + cbUseGradients = new QCheckBox( i18n("Draw gr&adients"), gb ); QWhatsThis::add( cbUseGradients, i18n("When selected, decorations are drawn with gradients " "for highcolor displays, otherwise no gradients are drawn.") ); - layout->addWidget(cbUseGradients); - } - else - { - cbUseGradients = 0L; } // Allow titlebar height customization - gbSlider = new QGroupBox( 1, Qt::Horizontal, i18n("TitleBar Height"), dummyWidget ); + gbSlider = new QGroupBox( 1, Qt::Horizontal, i18n("TitleBar Height"), gb ); titleBarSizeSlider = new QSlider(0, 2, 1, 0, QSlider::Horizontal, gbSlider); QWhatsThis::add( titleBarSizeSlider, i18n("By adjusting this slider, you can modify " "the height of the titlebar to make room for larger fonts.")); hbox = new QHBox(gbSlider); - hbox->setSpacing(KDialog::spacingHint()); + hbox->setSpacing(6); label1 = new QLabel( i18n("Normal"), hbox ); label2 = new QLabel( i18n("Large"), hbox ); label2->setAlignment( AlignHCenter ); label3 = new QLabel( i18n("Huge"), hbox ); label3->setAlignment( AlignRight ); - - layout->addWidget(gbSlider); - layout->addStretch(); // Load configuration options load( conf ); @@ -98,12 +84,15 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent ) if (highcolor) connect( cbUseGradients, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) ); + + // Make the widgets visible in kwindecoration + gb->show(); } KDEDefaultConfig::~KDEDefaultConfig() { - delete dummyWidget; + delete gb; } diff --git a/clients/default/config/config.h b/clients/default/config/config.h index 8e3a5ff430..e201ee333b 100644 --- a/clients/default/config/config.h +++ b/clients/default/config/config.h @@ -40,12 +40,11 @@ class KDEDefaultConfig: public QObject void slotSelectionChanged(int); // Internal use private: - QWidget *dummyWidget; - QCheckBox* cbShowStipple; QCheckBox* cbShowGrabBar; QCheckBox* cbUseGradients; QSlider* titleBarSizeSlider; + QGroupBox* gb; bool highcolor; QLabel* label1; QLabel* label2;