Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/viewmanager.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 0d91c12..33bef5a 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -57,12 +57,13 @@ $Id$ #include <kdebug.h> #include <kactionclasses.h> #include <qlayout.h> +#include <qapplication.h> #include <qwidgetstack.h> #include <kabc/addressbook.h> #include "filtereditdialog.h" #include "addviewdialog.h" #include "kabcore.h" @@ -103,13 +104,16 @@ void ViewManager::restoreSettings() mActionSelectView->setItems( mViewNameList ); // Filter mFilterList = Filter::restore( mCore->config(), "Filter" ); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); - mActionSelectFilter->setComboWidth( 150 ); + int cw = 150; + if (QApplication::desktop()->width() == 480 ) + cw = 0; + mActionSelectFilter->setComboWidth( cw ); // Tell the views to reread their config, since they may have // been modified by global settings QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -594,13 +598,16 @@ void ViewManager::configureFilters() mFilterList = dlg.filters(); uint pos = mActionSelectFilter->currentItem(); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); - mActionSelectFilter->setComboWidth( 150 ); + int cw = 150; + if (QApplication::desktop()->width() == 480 ) + cw = 0; + mActionSelectFilter->setComboWidth( cw ); } QStringList ViewManager::filterNames() const { QStringList names( i18n( "No Filter" ) ); |