From 435d67be852dc98b460bd3123a2164131db82334 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 28 Mar 2005 15:16:46 +0000 Subject: more fixes --- diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ad1c0cd..2da592b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1659,27 +1659,59 @@ 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; else p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; if ( filterToolBar ) { - p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); if ( p->mToolBarHorF ) p->mToolBarUpF = filterToolBar->y() > height()/2; else p->mToolBarUpF = filterToolBar->x() > width()/2 ; } +#endif + + mView->writeSettings(); if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) save(); -- cgit v0.9.0.2