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
@@ -1661,2 +1661,33 @@ void MainWindow::saveOnClose()
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 )
@@ -1665,3 +1696,2 @@ void MainWindow::saveOnClose()
p->mToolBarUp = iconToolBar->x() > width()/2;
- p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal );
if ( p->mToolBarHorV )
@@ -1670,3 +1700,3 @@ void MainWindow::saveOnClose()
p->mToolBarUpV = viewToolBar->x() > width()/2 ;
- p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal );
+
if ( p->mToolBarHorN )
@@ -1676,3 +1706,2 @@ void MainWindow::saveOnClose()
if ( filterToolBar ) {
- p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal );
if ( p->mToolBarHorF )
@@ -1682,2 +1711,5 @@ void MainWindow::saveOnClose()
}
+#endif
+
+
mView->writeSettings();