summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp38
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
@@ -1658,29 +1658,61 @@ void MainWindow::importQtopia()
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();
}