-rw-r--r-- | kaddressbook/kabcore.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b7edccd..f6bdda4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -789,2 +789,3 @@ void KABCore::resizeEvent(QResizeEvent* e ) return; + //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); if ( QApplication::desktop()->width() >= 480 ) { @@ -2194,3 +2195,6 @@ void KABCore::addActionsManually() mViewManager->getFilterAction()->plug ( tb); - if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { + //LR hide filteraction on started in 480x640 + if (QApplication::desktop()->width() == 480 ) { + mViewManager->getFilterAction()->setComboWidth( 0 ); + } mActionUndo->plug( tb ); @@ -2198,3 +2202,2 @@ void KABCore::addActionsManually() mActionRedo->plug( tb ); - } } else { diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 0d91c12..33bef5a 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -62,2 +62,3 @@ $Id$ #include <qlayout.h> +#include <qapplication.h> #include <qwidgetstack.h> @@ -108,3 +109,6 @@ void ViewManager::restoreSettings() 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 @@ -599,3 +603,6 @@ void ViewManager::configureFilters() setActiveFilter( pos ); - mActionSelectFilter->setComboWidth( 150 ); + int cw = 150; + if (QApplication::desktop()->width() == 480 ) + cw = 0; + mActionSelectFilter->setComboWidth( cw ); } |