author | drw <drw> | 2002-11-22 01:13:36 (UTC) |
---|---|---|
committer | drw <drw> | 2002-11-22 01:13:36 (UTC) |
commit | 380dc82f6e03f1357e91c0c6e3dd48bcc38969a5 (patch) (side-by-side diff) | |
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 | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index 5fc3e8e..1fee919 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp @@ -285,47 +285,54 @@ void OTabWidget::selectTab( OTabInfo *tab ) widgetStack->raiseWidget( tab->control() ); emit currentChanged( tab->control() ); currentTab = tab; } void OTabWidget::setUpLayout() { tabBar->layoutTabs(); QSize t( tabBarStack->sizeHint() ); - if ( t.width() > width() ) + if ( tabBarStyle == IconTab ) + { + if ( t.width() > width() ) + t.setWidth( width() ); + } + else + { t.setWidth( width() ); + } int lw = widgetStack->lineWidth(); if ( tabBarPosition == Bottom ) { tabBarStack->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() ); widgetStack->setGeometry( 0, 0, width(), height()-t.height()+QMAX(0, lw-2) ); } else { tabBarStack->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); - widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX(0, lw-2)); + widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX( 0, lw-2 ) ); } if ( autoMask() ) updateMask(); } QSize OTabWidget::sizeHint() const { QSize s( widgetStack->sizeHint() ); QSize t( tabBarStack->sizeHint() ); - return QSize( QMAX( s.width(), t.width()), s.height() + t.height() ); + return QSize( QMAX( s.width(), t.width() ), s.height() + t.height() ); } void OTabWidget::resizeEvent( QResizeEvent * ) { setUpLayout(); } int OTabWidget::getCurrentTab() { if ( currentTab ) { return currentTab->id(); } |