summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-17 11:06:59 (UTC)
committer zautrix <zautrix>2004-09-17 11:06:59 (UTC)
commitd7a6a271b48f0c79e1f3beca03bbc9c3f2a54050 (patch) (side-by-side diff)
tree6bf244eed529e8141f7176ce9ec575ad4507bd7f
parente8dac946bcd8c080b9abb74b45221ca0c5f268c7 (diff)
downloadkdepimpi-d7a6a271b48f0c79e1f3beca03bbc9c3f2a54050.zip
kdepimpi-d7a6a271b48f0c79e1f3beca03bbc9c3f2a54050.tar.gz
kdepimpi-d7a6a271b48f0c79e1f3beca03bbc9c3f2a54050.tar.bz2
Fixed layout problem in modify view
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/viewconfigurefieldspage.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp
index 2c827eb..5daae1a 100644
--- a/kaddressbook/viewconfigurefieldspage.cpp
+++ b/kaddressbook/viewconfigurefieldspage.cpp
@@ -34,8 +34,9 @@
#include <kdialog.h>
#include <klocale.h>
#include <qtoolbutton.h>
+#include <qapplication.h>
#include <qlabel.h>
#include <qlistbox.h>
#include <qlayout.h>
@@ -218,9 +219,8 @@ void ViewConfigureFieldsPage::initGUI()
setCaption( i18n("Select Fields to Display") );
QGridLayout *gl = 0;
-
if (orientation == 0)
gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() );
else
gl = new QGridLayout( this , 4, 6, 0, KDialog::spacingHint() );
@@ -229,9 +229,10 @@ void ViewConfigureFieldsPage::initGUI()
mCategoryCombo = new KComboBox( false, this );
#else //KAB_EMBEDDED
mCategoryCombo = new QComboBox( false, this );
#endif //KAB_EMBEDDED
-
+ if ( QApplication::desktop()->width() < 320 )
+ mCategoryCombo->setMaximumWidth( 70 );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::All ) );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Frequent ) );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Address ) );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Email ) );
@@ -240,25 +241,30 @@ void ViewConfigureFieldsPage::initGUI()
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::CustomCategory ) );
connect( mCategoryCombo, SIGNAL( activated(int) ), SLOT( slotShowFields(int) ) );
gl->addWidget( mCategoryCombo, 0, 0 );
- QLabel *label = new QLabel( i18n( "&Selected fields:" ), this );
+ QLabel *label = new QLabel( i18n( "&Selected\nfields:" ), this );
if (orientation == 0)
gl->addWidget( label, 0, 2 );
else
gl->addWidget( label, 2, 0 );
mUnSelectedBox = new QListBox( this );
mUnSelectedBox->setSelectionMode( QListBox::Extended );
- mUnSelectedBox->setMinimumHeight( 100 );
+ mUnSelectedBox->setMinimumHeight( 80 );
if (orientation == 0)
gl->addWidget( mUnSelectedBox, 1, 0 );
else
gl->addWidget( mUnSelectedBox, 0, 1 );
mSelectedBox = new QListBox( this );
+ //if ( QApplication::desktop()->width() < 320 ) {
+ // mUnSelectedBox->setMaximumWidth( 134 );
+ // mSelectedBox->setMaximumWidth( 134 );
+ //}
mSelectedBox->setSelectionMode( QListBox::Extended );
+ mSelectedBox->setMinimumHeight( 80 );
label->setBuddy( mSelectedBox );
if (orientation == 0)
gl->addWidget( mSelectedBox, 1, 2 );
else
@@ -324,12 +330,12 @@ void ViewConfigureFieldsPage::initGUI()
// make sure we fill the list with all items, so that we can
// get the maxItemWidth we need to not truncate the view
slotShowFields( 0 );
- sizeHint = sizeHint.expandedTo( mSelectedBox->sizeHint() );
- sizeHint.setWidth( mUnSelectedBox->maxItemWidth() );
- mUnSelectedBox->setMinimumSize( sizeHint );
- mSelectedBox->setMinimumSize( sizeHint );
+ //sizeHint = sizeHint.expandedTo( mSelectedBox->sizeHint() );
+ //sizeHint.setWidth( mUnSelectedBox->maxItemWidth() );
+ // mUnSelectedBox->setMinimumSize( sizeHint );
+ //mSelectedBox->setMinimumSize( sizeHint );
gl->activate();
connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );