-rw-r--r-- | kaddressbook/kabcore.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 74e5cf7..1a1bcff 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -296,7 +296,15 @@ void KABCore::restoreSettings() mExtensionManager->restoreSettings(); - - QValueList<int> 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<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + if ( true /*splitterSize.count() == 0*/ ) { + splitterSize.append( wid / 2 ); + splitterSize.append( wid / 2 ); } @@ -304,8 +312,8 @@ void KABCore::restoreSettings() 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 ); |