Diffstat (limited to 'kaddressbook/addresseeeditorwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 310d628..9814cd5 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -156,3 +156,10 @@ void AddresseeEditorWidget::setupTab1() | |||
156 | //US QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); | 156 | //US QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); |
157 | QGridLayout *layout = new QGridLayout( tab1, 7, 1 ); | 157 | bool horLayout = false; |
158 | int maxCol = 1; | ||
159 | if ( QApplication::desktop()->width() == 640 || QApplication::desktop()->width() == 320 ) { | ||
160 | horLayout = true; | ||
161 | maxCol = 3; | ||
162 | } | ||
163 | QGridLayout *layout = new QGridLayout( tab1, 8-maxCol, maxCol ); | ||
164 | |||
158 | layout->setMargin( KDialogBase::marginHintSmall() ); | 165 | layout->setMargin( KDialogBase::marginHintSmall() ); |
@@ -208,10 +215,21 @@ void AddresseeEditorWidget::setupTab1() | |||
208 | SLOT( textChanged( const QString& ) ) ); | 215 | SLOT( textChanged( const QString& ) ) ); |
216 | if ( horLayout ) { | ||
217 | layout->addWidget( button, 1, 2 ); | ||
218 | layout->addWidget( mOrgEdit, 1, 3 ); | ||
219 | |||
220 | } else { | ||
209 | layout->addWidget( button, 2, 0 ); | 221 | layout->addWidget( button, 2, 0 ); |
210 | layout->addWidget( mOrgEdit, 2, 1 ); | 222 | layout->addWidget( mOrgEdit, 2, 1 ); |
223 | } | ||
211 | 224 | ||
212 | // File as (formatted name) | 225 | // File as (formatted name) |
213 | label = new QLabel( i18n( "Formatted name:" ), tab1 ); | 226 | label = new QLabel( i18n( "Format.n.:" ), tab1 ); |
214 | mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); | 227 | mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); |
228 | if ( horLayout ) { | ||
229 | layout->addWidget( label, 0,2 ); | ||
230 | layout->addWidget( mFormattedNameLabel, 0, 3 ); | ||
231 | } else { | ||
215 | layout->addWidget( label, 3, 0 ); | 232 | layout->addWidget( label, 3, 0 ); |
216 | layout->addWidget( mFormattedNameLabel, 3, 1 ); | 233 | layout->addWidget( mFormattedNameLabel, 3, 1 ); |
234 | } | ||
217 | /* LR | 235 | /* LR |
@@ -242,3 +260,3 @@ void AddresseeEditorWidget::setupTab1() | |||
242 | #endif | 260 | #endif |
243 | layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, 1 ); | 261 | layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, maxCol ); |
244 | ++iii; | 262 | ++iii; |
@@ -323,3 +341,3 @@ void AddresseeEditorWidget::setupTab1() | |||
323 | //US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); | 341 | //US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); |
324 | layout->addMultiCellWidget( categoryBox, iii, iii, 0, 1 ); | 342 | layout->addMultiCellWidget( categoryBox, iii, iii, 0, maxCol ); |
325 | 343 | ||