Argh
svn path=/trunk/kdebase/kwin/; revision=155140
This commit is contained in:
parent
cd52271a10
commit
3e89b66d03
2 changed files with 13 additions and 25 deletions
|
@ -12,9 +12,7 @@
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
#include <qwhatsthis.h>
|
#include <qwhatsthis.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <qlayout.h>
|
|
||||||
#include <qpixmap.h>
|
#include <qpixmap.h>
|
||||||
#include <kdialog.h>
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
@ -35,55 +33,43 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
|
||||||
{
|
{
|
||||||
KGlobal::locale()->insertCatalogue("kwin_default_config");
|
KGlobal::locale()->insertCatalogue("kwin_default_config");
|
||||||
highcolor = QPixmap::defaultDepth() > 8;
|
highcolor = QPixmap::defaultDepth() > 8;
|
||||||
|
gb = new QGroupBox( 1, Qt::Horizontal,
|
||||||
|
i18n("Decoration Settings"), parent );
|
||||||
|
|
||||||
dummyWidget = new QWidget( parent );
|
cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), gb );
|
||||||
QVBoxLayout *layout = new QVBoxLayout( dummyWidget );
|
|
||||||
layout->setSpacing(KDialog::spacingHint());
|
|
||||||
|
|
||||||
cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), dummyWidget );
|
|
||||||
QWhatsThis::add( cbShowStipple,
|
QWhatsThis::add( cbShowStipple,
|
||||||
i18n("When selected, active titlebars are drawn "
|
i18n("When selected, active titlebars are drawn "
|
||||||
"with a stipple (dotted) effect. Otherwise, they are "
|
"with a stipple (dotted) effect. Otherwise, they are "
|
||||||
"drawn without the stipple."));
|
"drawn without the stipple."));
|
||||||
layout->addWidget( cbShowStipple );
|
|
||||||
|
cbShowGrabBar = new QCheckBox( i18n("Draw g&rab bar below windows"), gb );
|
||||||
cbShowGrabBar = new QCheckBox( i18n("Draw g&rab bar below windows"), dummyWidget );
|
|
||||||
QWhatsThis::add( cbShowGrabBar,
|
QWhatsThis::add( cbShowGrabBar,
|
||||||
i18n("When selected, decorations are drawn with a \"grab bar\" "
|
i18n("When selected, decorations are drawn with a \"grab bar\" "
|
||||||
"below windows. Otherwise, no grab bar is drawn."));
|
"below windows. Otherwise, no grab bar is drawn."));
|
||||||
layout->addWidget( cbShowGrabBar );
|
|
||||||
|
|
||||||
// Only show the gradient checkbox for highcolor displays
|
// Only show the gradient checkbox for highcolor displays
|
||||||
if (highcolor)
|
if (highcolor)
|
||||||
{
|
{
|
||||||
cbUseGradients = new QCheckBox( i18n("Draw gr&adients"), dummyWidget );
|
cbUseGradients = new QCheckBox( i18n("Draw gr&adients"), gb );
|
||||||
QWhatsThis::add( cbUseGradients,
|
QWhatsThis::add( cbUseGradients,
|
||||||
i18n("When selected, decorations are drawn with gradients "
|
i18n("When selected, decorations are drawn with gradients "
|
||||||
"for highcolor displays, otherwise no gradients are drawn.") );
|
"for highcolor displays, otherwise no gradients are drawn.") );
|
||||||
layout->addWidget(cbUseGradients);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cbUseGradients = 0L;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow titlebar height customization
|
// 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);
|
titleBarSizeSlider = new QSlider(0, 2, 1, 0, QSlider::Horizontal, gbSlider);
|
||||||
QWhatsThis::add( titleBarSizeSlider,
|
QWhatsThis::add( titleBarSizeSlider,
|
||||||
i18n("By adjusting this slider, you can modify "
|
i18n("By adjusting this slider, you can modify "
|
||||||
"the height of the titlebar to make room for larger fonts."));
|
"the height of the titlebar to make room for larger fonts."));
|
||||||
|
|
||||||
hbox = new QHBox(gbSlider);
|
hbox = new QHBox(gbSlider);
|
||||||
hbox->setSpacing(KDialog::spacingHint());
|
hbox->setSpacing(6);
|
||||||
label1 = new QLabel( i18n("Normal"), hbox );
|
label1 = new QLabel( i18n("Normal"), hbox );
|
||||||
label2 = new QLabel( i18n("Large"), hbox );
|
label2 = new QLabel( i18n("Large"), hbox );
|
||||||
label2->setAlignment( AlignHCenter );
|
label2->setAlignment( AlignHCenter );
|
||||||
label3 = new QLabel( i18n("Huge"), hbox );
|
label3 = new QLabel( i18n("Huge"), hbox );
|
||||||
label3->setAlignment( AlignRight );
|
label3->setAlignment( AlignRight );
|
||||||
|
|
||||||
layout->addWidget(gbSlider);
|
|
||||||
layout->addStretch();
|
|
||||||
|
|
||||||
// Load configuration options
|
// Load configuration options
|
||||||
load( conf );
|
load( conf );
|
||||||
|
@ -98,12 +84,15 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
|
||||||
if (highcolor)
|
if (highcolor)
|
||||||
connect( cbUseGradients, SIGNAL(clicked()),
|
connect( cbUseGradients, SIGNAL(clicked()),
|
||||||
this, SLOT(slotSelectionChanged()) );
|
this, SLOT(slotSelectionChanged()) );
|
||||||
|
|
||||||
|
// Make the widgets visible in kwindecoration
|
||||||
|
gb->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
KDEDefaultConfig::~KDEDefaultConfig()
|
KDEDefaultConfig::~KDEDefaultConfig()
|
||||||
{
|
{
|
||||||
delete dummyWidget;
|
delete gb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,11 @@ class KDEDefaultConfig: public QObject
|
||||||
void slotSelectionChanged(int); // Internal use
|
void slotSelectionChanged(int); // Internal use
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget *dummyWidget;
|
|
||||||
|
|
||||||
QCheckBox* cbShowStipple;
|
QCheckBox* cbShowStipple;
|
||||||
QCheckBox* cbShowGrabBar;
|
QCheckBox* cbShowGrabBar;
|
||||||
QCheckBox* cbUseGradients;
|
QCheckBox* cbUseGradients;
|
||||||
QSlider* titleBarSizeSlider;
|
QSlider* titleBarSizeSlider;
|
||||||
|
QGroupBox* gb;
|
||||||
bool highcolor;
|
bool highcolor;
|
||||||
QLabel* label1;
|
QLabel* label1;
|
||||||
QLabel* label2;
|
QLabel* label2;
|
||||||
|
|
Loading…
Reference in a new issue