author | zautrix <zautrix> | 2005-03-28 15:16:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-28 15:16:46 (UTC) |
commit | 435d67be852dc98b460bd3123a2164131db82334 (patch) (side-by-side diff) | |
tree | 5d031d970da9214e111079061ccae271752c33c0 /korganizer | |
parent | e4e6bda3a6b0a82e3f64db0fa5f7d60cab9f0e48 (diff) | |
download | kdepimpi-435d67be852dc98b460bd3123a2164131db82334.zip kdepimpi-435d67be852dc98b460bd3123a2164131db82334.tar.gz kdepimpi-435d67be852dc98b460bd3123a2164131db82334.tar.bz2 |
more fixes
-rw-r--r-- | korganizer/mainwindow.cpp | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ad1c0cd..2da592b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1660,14 +1660,44 @@ void MainWindow::saveOnClose() KOPrefs *p = KOPrefs::instance(); p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); + p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); + p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); + if ( filterToolBar ) { + p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); + } +#ifdef DESKTOP_VERSION + + QPoint myP; + myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); + if ( p->mToolBarHor ) + p->mToolBarUp = myP.y() > height()/2; + else + p->mToolBarUp = myP.x() > width()/2; + myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); + if ( p->mToolBarHorV ) + p->mToolBarUpV = myP.y() > height()/2; + else + p->mToolBarUpV = myP.x() > width()/2 ; + myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); + if ( p->mToolBarHorN ) + p->mToolBarUpN = myP.y() > height()/2; + else + p->mToolBarUpN = myP.x() > width()/2 ; + if ( filterToolBar ) { + myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); + if ( p->mToolBarHorF ) + p->mToolBarUpF = myP.y() > height()/2; + else + p->mToolBarUpF = myP.x() > width()/2 ; + } +#else if ( p->mToolBarHor ) p->mToolBarUp = iconToolBar->y() > height()/2; else p->mToolBarUp = iconToolBar->x() > width()/2; - p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); if ( p->mToolBarHorV ) p->mToolBarUpV = viewToolBar->y() > height()/2; else p->mToolBarUpV = viewToolBar->x() > width()/2 ; - p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); + if ( p->mToolBarHorN ) p->mToolBarUpN = navigatorToolBar->y() > height()/2; @@ -1675,5 +1705,4 @@ void MainWindow::saveOnClose() p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; if ( filterToolBar ) { - p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); if ( p->mToolBarHorF ) p->mToolBarUpF = filterToolBar->y() > height()/2; @@ -1681,4 +1710,7 @@ void MainWindow::saveOnClose() p->mToolBarUpF = filterToolBar->x() > width()/2 ; } +#endif + + mView->writeSettings(); if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |