author | zautrix <zautrix> | 2004-10-19 10:52:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-19 10:52:21 (UTC) |
commit | 4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69 (patch) (unidiff) | |
tree | 8213284e178e82b6ab3a41bae1ef81379704379f | |
parent | b5d1458a283b624980ec64b10b3f7ec1168fc659 (diff) | |
download | kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.zip kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.tar.gz kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.tar.bz2 |
fixed layout problems in config widgets
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 8 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 30 |
2 files changed, 24 insertions, 14 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index c8b68c7..936d052 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp | |||
@@ -98,8 +98,9 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
98 | QWidget *generalPage = new QWidget( this ); | 98 | QWidget *generalPage = new QWidget( this ); |
99 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), | 99 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), |
100 | KDialog::spacingHintSmall() ); | 100 | KDialog::spacingHintSmall() ); |
101 | 101 | ||
102 | |||
102 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); | 103 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); |
103 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); | 104 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); |
104 | KPrefsWidFont *detailsFont = | 105 | KPrefsWidFont *detailsFont = |
105 | addWidFont(i18n("phone:123"),i18n("Details view font"), | 106 | addWidFont(i18n("phone:123"),i18n("Details view font"), |
@@ -108,17 +109,16 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
108 | hboxLayout->addWidget(detailsFont->preview()); | 109 | hboxLayout->addWidget(detailsFont->preview()); |
109 | hboxLayout->addWidget(detailsFont->button()); | 110 | hboxLayout->addWidget(detailsFont->button()); |
110 | hboxLayout->setMargin(KDialog::marginHintSmall() ); | 111 | hboxLayout->setMargin(KDialog::marginHintSmall() ); |
111 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); | 112 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); |
113 | //hBox->setBackgroundColor( black); | ||
112 | layout->addWidget( hBox ); | 114 | layout->addWidget( hBox ); |
113 | 115 | ||
114 | //general groupbox | 116 | //general groupbox |
115 | QVBox *vBox = new QVBox( generalPage, "qvbox" ); | 117 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); |
116 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); | 118 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); |
117 | boxLayout->setAlignment( Qt::AlignTop ); | 119 | boxLayout->setAlignment( Qt::AlignTop ); |
118 | boxLayout->setMargin(KDialog::marginHintSmall() ); | 120 | boxLayout->setMargin(KDialog::marginHintSmall() ); |
119 | vBox->layout()->setMargin(KDialog::marginHintSmall()) ; | ||
120 | vBox->layout()->setSpacing(KDialog::spacingHintSmall()); | ||
121 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); | 121 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); |
122 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); | 122 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); |
123 | boxLayout->addWidget( mSearchReturnBox ); | 123 | boxLayout->addWidget( mSearchReturnBox ); |
124 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); | 124 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 332f975..6de60fa 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -128,9 +128,9 @@ void KDEPIMConfigWidget::setupExternalAppTab() | |||
128 | 128 | ||
129 | 129 | ||
130 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 130 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
131 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 131 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
132 | 132 | mExternalAppGroupBox->layout()->setMargin(5); | |
133 | 133 | ||
134 | mClient = new QComboBox( mExternalAppGroupBox ); | 134 | mClient = new QComboBox( mExternalAppGroupBox ); |
135 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 135 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
136 | 136 | ||
@@ -157,8 +157,9 @@ void KDEPIMConfigWidget::setupExternalAppTab() | |||
157 | 157 | ||
158 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 158 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
159 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 159 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
160 | 160 | ||
161 | |||
161 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 162 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
162 | boxLayout->addWidget( lab, 6, 0 ); | 163 | boxLayout->addWidget( lab, 6, 0 ); |
163 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 164 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
164 | mMessage2->setReadOnly(true); | 165 | mMessage2->setReadOnly(true); |
@@ -191,10 +192,10 @@ void KDEPIMConfigWidget::setupLocaleDateTab() | |||
191 | { | 192 | { |
192 | QWidget *topFrame = new QWidget( this ); | 193 | QWidget *topFrame = new QWidget( this ); |
193 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 194 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
194 | 195 | ||
195 | topLayout->setSpacing(KDialog::spacingHint()); | 196 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
196 | topLayout->setMargin(KDialog::marginHint()); | 197 | topLayout->setMargin(KDialog::marginHintSmall()); |
197 | int iii = 0; | 198 | int iii = 0; |
198 | 199 | ||
199 | 200 | ||
200 | KPrefsWidRadios *syncPrefsGroup = | 201 | KPrefsWidRadios *syncPrefsGroup = |
@@ -215,8 +216,12 @@ void KDEPIMConfigWidget::setupLocaleDateTab() | |||
215 | else | 216 | else |
216 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 217 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
217 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 218 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
218 | syncPrefsGroup->addRadio(i18n("User defined")); | 219 | syncPrefsGroup->addRadio(i18n("User defined")); |
220 | if ( QApplication::desktop()->width() < 480 ) { | ||
221 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | ||
222 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | ||
223 | } | ||
219 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 224 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
220 | ++iii; | 225 | ++iii; |
221 | ++iii; | 226 | ++iii; |
222 | QLabel * lab; | 227 | QLabel * lab; |
@@ -262,10 +267,12 @@ void KDEPIMConfigWidget::setupLocaleTab() | |||
262 | syncPrefsGroup->addRadio(i18n("German")); | 267 | syncPrefsGroup->addRadio(i18n("German")); |
263 | syncPrefsGroup->addRadio(i18n("French")); | 268 | syncPrefsGroup->addRadio(i18n("French")); |
264 | syncPrefsGroup->addRadio(i18n("Italian")); | 269 | syncPrefsGroup->addRadio(i18n("Italian")); |
265 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 270 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
266 | if ( QApplication::desktop()->width() < 300 ) | 271 | if ( QApplication::desktop()->width() < 300 ) { |
267 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 272 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
273 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | ||
274 | } | ||
268 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 275 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
269 | ++iii; | 276 | ++iii; |
270 | 277 | ||
271 | syncPrefsGroup = | 278 | syncPrefsGroup = |
@@ -292,10 +299,10 @@ void KDEPIMConfigWidget::setupLocaleTab() | |||
292 | void KDEPIMConfigWidget::setupTimeZoneTab() | 299 | void KDEPIMConfigWidget::setupTimeZoneTab() |
293 | { | 300 | { |
294 | QWidget *topFrame = new QWidget( this ); | 301 | QWidget *topFrame = new QWidget( this ); |
295 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); | 302 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); |
296 | topLayout->setSpacing(KDialog::spacingHint()); | 303 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
297 | topLayout->setMargin(KDialog::marginHint()); | 304 | topLayout->setMargin(KDialog::marginHintSmall()); |
298 | 305 | ||
299 | QHBox *timeZoneBox = new QHBox( topFrame ); | 306 | QHBox *timeZoneBox = new QHBox( topFrame ); |
300 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 307 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
301 | 308 | ||
@@ -330,12 +337,15 @@ void KDEPIMConfigWidget::setupTimeZoneTab() | |||
330 | sb = | 337 | sb = |
331 | addWidBool(i18n("Timezone has daylight saving"), | 338 | addWidBool(i18n("Timezone has daylight saving"), |
332 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 339 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
333 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 340 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
334 | ++iii; | 341 | ++iii; |
335 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 342 | QLabel* lab; |
343 | |||
344 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | ||
336 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 345 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
337 | ++iii; | 346 | ++iii; |
347 | |||
338 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 348 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
339 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 349 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
340 | ++iii; | 350 | ++iii; |
341 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 351 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |