summaryrefslogtreecommitdiff
authorzecke <zecke>2003-08-28 14:45:00 (UTC)
committer zecke <zecke>2003-08-28 14:45:00 (UTC)
commit5665c2c773a82b6c8a13ae7019a1d60bc0ab7778 (patch) (unidiff)
tree0cdb4eb43c9bab11c9be3ed02c5349f3480435fd
parent20c41310c4669bb0e349dc14745f42a9241a7f1c (diff)
downloadopie-5665c2c773a82b6c8a13ae7019a1d60bc0ab7778.zip
opie-5665c2c773a82b6c8a13ae7019a1d60bc0ab7778.tar.gz
opie-5665c2c773a82b6c8a13ae7019a1d60bc0ab7778.tar.bz2
rotation and docking fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/serverinterface.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/launcher/serverinterface.cpp b/core/launcher/serverinterface.cpp
index 7002243..9eb7f75 100644
--- a/core/launcher/serverinterface.cpp
+++ b/core/launcher/serverinterface.cpp
@@ -87,7 +87,7 @@ bool LayoutManager::eventFilter( QObject *object, QEvent *event )
87 if ( item ) 87 if ( item )
88 layout(); 88 layout();
89 break; 89 break;
90 90
91 default: 91 default:
92 break; 92 break;
93 } 93 }
@@ -104,25 +104,27 @@ void LayoutManager::layout()
104 QWidget *w = item->w; 104 QWidget *w = item->w;
105 if ( !w->isVisible() ) 105 if ( !w->isVisible() )
106 continue; 106 continue;
107
108 QSize sh = w->sizeHint();
107 switch ( item->p ) { 109 switch ( item->p ) {
108 case ServerInterface::Top: 110 case ServerInterface::Top:
109 w->resize( mwr.width(), w->sizeHint().height() ); 111 w->setGeometry( mwr.left(), mwr.top(),
110 w->move( mwr.topLeft() ); 112 mwr.width(), sh.height() );
111 mwr.setTop( w->geometry().bottom() + 1 ); 113 mwr.setTop( w->geometry().bottom() + 1 );
112 break; 114 break;
113 case ServerInterface::Bottom: 115 case ServerInterface::Bottom:
114 w->resize( mwr.width(), w->sizeHint().height() ); 116 w->setGeometry( mwr.left(), mwr.bottom() - sh.height(),
115 w->move( mwr.left(), mwr.bottom()-w->height()+1 ); 117 mwr.width(), sh.height() );
116 mwr.setBottom( w->geometry().top() - 1 ); 118 mwr.setBottom( w->geometry().top() - 1 );
117 break; 119 break;
118 case ServerInterface::Left: 120 case ServerInterface::Left:
119 w->resize( w->sizeHint().width(), mwr.height() ); 121 w->setGeometry( mwr.left(), mwr.top(),
120 w->move( mwr.topLeft() ); 122 sh.width(), mwr.height() );
121 mwr.setLeft( w->geometry().right() + 1 ); 123 mwr.setLeft( w->geometry().right() + 1 );
122 break; 124 break;
123 case ServerInterface::Right: 125 case ServerInterface::Right:
124 w->resize( w->sizeHint().width(), mwr.height() ); 126 w->setGeometry( mwr.right() - sh.width(), mwr.top(),
125 w->move( mwr.right()-w->width()+1, mwr.top() ); 127 sh.width(), mwr.height() );
126 mwr.setRight( w->geometry().left() - 1 ); 128 mwr.setRight( w->geometry().left() - 1 );
127 break; 129 break;
128 } 130 }
@@ -336,7 +338,7 @@ LayoutManager::Item *LayoutManager::findWidget( const QWidget *w ) const
336 according to the order that it was docked, its sizeHint() and whether 338 according to the order that it was docked, its sizeHint() and whether
337 previously docked widgets are visible. The desktop area available to 339 previously docked widgets are visible. The desktop area available to
338 QWidget::showMaximized() will exclude any visible docked widgets. 340 QWidget::showMaximized() will exclude any visible docked widgets.
339 341
340 For example, if a widget is 342 For example, if a widget is
341 docked at the bottom of the screen, its sizeHint() will define its 343 docked at the bottom of the screen, its sizeHint() will define its
342 height and it will use the full width of the screen. If a widget is 344 height and it will use the full width of the screen. If a widget is