author | drw <drw> | 2002-11-22 01:13:36 (UTC) |
---|---|---|
committer | drw <drw> | 2002-11-22 01:13:36 (UTC) |
commit | 380dc82f6e03f1357e91c0c6e3dd48bcc38969a5 (patch) (unidiff) | |
tree | 3b23d8b7afe2f6a9f77c9700ffe812f349f21628 | |
parent | 1c2a0db4c2454a36ebf5c676f8ce803b285e60b8 (diff) | |
download | opie-380dc82f6e03f1357e91c0c6e3dd48bcc38969a5.zip opie-380dc82f6e03f1357e91c0c6e3dd48bcc38969a5.tar.gz opie-380dc82f6e03f1357e91c0c6e3dd48bcc38969a5.tar.bz2 |
Hopefully corrects bug #467
-rw-r--r-- | libopie/otabwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index 5fc3e8e..1fee919 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp | |||
@@ -285,26 +285,33 @@ void OTabWidget::selectTab( OTabInfo *tab ) | |||
285 | 285 | ||
286 | widgetStack->raiseWidget( tab->control() ); | 286 | widgetStack->raiseWidget( tab->control() ); |
287 | 287 | ||
288 | emit currentChanged( tab->control() ); | 288 | emit currentChanged( tab->control() ); |
289 | 289 | ||
290 | currentTab = tab; | 290 | currentTab = tab; |
291 | } | 291 | } |
292 | 292 | ||
293 | void OTabWidget::setUpLayout() | 293 | void OTabWidget::setUpLayout() |
294 | { | 294 | { |
295 | tabBar->layoutTabs(); | 295 | tabBar->layoutTabs(); |
296 | QSize t( tabBarStack->sizeHint() ); | 296 | QSize t( tabBarStack->sizeHint() ); |
297 | if ( tabBarStyle == IconTab ) | ||
298 | { | ||
297 | if ( t.width() > width() ) | 299 | if ( t.width() > width() ) |
298 | t.setWidth( width() ); | 300 | t.setWidth( width() ); |
301 | } | ||
302 | else | ||
303 | { | ||
304 | t.setWidth( width() ); | ||
305 | } | ||
299 | int lw = widgetStack->lineWidth(); | 306 | int lw = widgetStack->lineWidth(); |
300 | if ( tabBarPosition == Bottom ) | 307 | if ( tabBarPosition == Bottom ) |
301 | { | 308 | { |
302 | tabBarStack->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() ); | 309 | tabBarStack->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() ); |
303 | widgetStack->setGeometry( 0, 0, width(), height()-t.height()+QMAX(0, lw-2) ); | 310 | widgetStack->setGeometry( 0, 0, width(), height()-t.height()+QMAX(0, lw-2) ); |
304 | } | 311 | } |
305 | else | 312 | else |
306 | { | 313 | { |
307 | tabBarStack->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); | 314 | tabBarStack->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); |
308 | widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX(0, lw-2)); | 315 | widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX(0, lw-2)); |
309 | } | 316 | } |
310 | 317 | ||