From f4385b9b0c15608c3b0cb55294c3ad8cafa46800 Mon Sep 17 00:00:00 2001 From: Nadeem Hasan Date: Sun, 6 Apr 2003 21:32:24 +0000 Subject: [PATCH] Fix margins and QGroupBox usage. svn path=/trunk/kdebase/kwin/; revision=218726 --- kcmkwin/kwinoptions/main.cpp | 5 +++++ kcmkwin/kwinoptions/mouse.cpp | 2 +- kcmkwin/kwinoptions/windows.cpp | 23 ++++++++++------------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/kcmkwin/kwinoptions/main.cpp b/kcmkwin/kwinoptions/main.cpp index eb3ab8598c..b399bc6581 100644 --- a/kcmkwin/kwinoptions/main.cpp +++ b/kcmkwin/kwinoptions/main.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "mouse.h" #include "windows.h" @@ -85,18 +86,22 @@ KWinOptions::KWinOptions(QWidget *parent, const char *name) layout->addWidget(tab); mFocus = new KFocusConfig(false, mConfig, this, "KWin Focus Config"); + mFocus->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mFocus, i18n("&Focus")); connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mActions = new KActionsConfig(false, mConfig, this, "KWin Actions"); + mActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mActions, i18n("Actio&ns")); connect(mActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mMoving = new KMovingConfig(false, mConfig, this, "KWin Moving"); + mMoving->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mMoving, i18n("&Moving")); connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mAdvanced = new KAdvancedConfig(false, mConfig, this, "KWin Advanced"); + mAdvanced->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mAdvanced, i18n("Ad&vanced")); connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); } diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index e950e6ca77..497b4de384 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -47,7 +47,7 @@ KActionsConfig::KActionsConfig (bool _standAlone, KConfig *_config, QWidget * pa : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3; - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint()); QGrid *grid; QGroupBox *box; QLabel *label; diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index 207e0aca10..ddb8573a66 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -93,7 +93,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { QString wtstr; - QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(),KDialog::spacingHint()); + QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint()); //iTLabel = new QLabel(i18n(" Allowed overlap:\n" // "(% of desktop space)"), @@ -110,9 +110,10 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent // focus policy fcsBox = new QButtonGroup(i18n("Focus"),this); + fcsBox->setColumnLayout( 0, Qt::Horizontal ); - QBoxLayout *fLay = new QVBoxLayout(fcsBox, KDialog::marginHint(), KDialog::spacingHint()); - fLay->addSpacing(fontMetrics().lineSpacing()); + QBoxLayout *fLay = new QVBoxLayout(fcsBox->layout(), + KDialog::spacingHint()); QBoxLayout *cLay = new QHBoxLayout(fLay); QLabel *fLabel = new QLabel(i18n("&Policy:"), fcsBox); @@ -179,10 +180,9 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent lay->addWidget(fcsBox); kbdBox = new QButtonGroup(i18n("Navigation"), this); - QGridLayout *kLay = new QGridLayout(kbdBox, 4, 4, - KDialog::marginHint(), + kbdBox->setColumnLayout( 0, Qt::Horizontal ); + QGridLayout *kLay = new QGridLayout(kbdBox->layout(), 4, 4, KDialog::spacingHint()); - kLay->addRowSpacing(0,fontMetrics().lineSpacing()); QLabel *altTabLabel = new QLabel( i18n("Walk through windows mode:"), kbdBox); kLay->addWidget(altTabLabel, 1, 0); kdeMode = new QRadioButton(i18n("&KDE"), kbdBox); @@ -438,8 +438,7 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *p : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { QString wtstr; - QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(), - KDialog::spacingHint()); + QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint()); //iTLabel = new QLabel(i18n(" Allowed overlap:\n" // "(% of desktop space)"), @@ -630,14 +629,12 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { QString wtstr; - QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(), - KDialog::spacingHint()); + QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint()); windowsBox = new QButtonGroup(i18n("Windows"), this); + windowsBox->setColumnLayout( 0, Qt::Horizontal ); - QBoxLayout *wLay = new QVBoxLayout (windowsBox,KDialog::marginHint(), - KDialog::spacingHint()); - wLay->addSpacing(fontMetrics().lineSpacing()); + QBoxLayout *wLay = new QVBoxLayout (windowsBox->layout(), KDialog::spacingHint()); QBoxLayout *bLay = new QVBoxLayout; wLay->addLayout(bLay);