From 83570b43ee0d53737007031161c2694824351089 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 08 Sep 2004 15:08:13 +0000 Subject: Fix for the Z --- (limited to 'kaddressbook/kabcore.cpp') diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 74e5cf7..1a1bcff 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -294,20 +294,28 @@ void KABCore::restoreSettings() mViewManager->restoreSettings(); mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); mExtensionManager->restoreSettings(); - - QValueList splitterSize = KABPrefs::instance()->mDetailsSplitter; - if ( splitterSize.count() == 0 ) { - splitterSize.append( width() / 2 ); - splitterSize.append( width() / 2 ); +#ifdef DESKTOP_VERSION + int wid = width(); + if ( wid < 10 ) + wid = 400; +#else + int wid = QApplication::desktop()->width(); + if ( wid < 640 ) + wid = QApplication::desktop()->height(); +#endif + QValueList splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + if ( true /*splitterSize.count() == 0*/ ) { + splitterSize.append( wid / 2 ); + splitterSize.append( wid / 2 ); } mMiniSplitter->setSizes( splitterSize ); if ( mExtensionBarSplitter ) { - splitterSize = KABPrefs::instance()->mExtensionsSplitter; - if ( splitterSize.count() == 0 ) { - splitterSize.append( width() / 2 ); - splitterSize.append( width() / 2 ); - } - mExtensionBarSplitter->setSizes( splitterSize ); + //splitterSize = KABPrefs::instance()->mExtensionsSplitter; + if ( true /*splitterSize.count() == 0*/ ) { + splitterSize.append( wid / 2 ); + splitterSize.append( wid / 2 ); + } + mExtensionBarSplitter->setSizes( splitterSize ); } -- cgit v0.9.0.2