summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.cpp13
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
@@ -294,8 +294,15 @@ void OTabWidget::setUpLayout()
294{ 294{
295 tabBar->layoutTabs(); 295 tabBar->layoutTabs();
296 QSize t( tabBarStack->sizeHint() ); 296 QSize t( tabBarStack->sizeHint() );
297 if ( t.width() > width() ) 297 if ( tabBarStyle == IconTab )
298 {
299 if ( t.width() > width() )
300 t.setWidth( width() );
301 }
302 else
303 {
298 t.setWidth( width() ); 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 {
@@ -305,7 +312,7 @@ void OTabWidget::setUpLayout()
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
311 if ( autoMask() ) 318 if ( autoMask() )
@@ -316,7 +323,7 @@ QSize OTabWidget::sizeHint() const
316{ 323{
317 QSize s( widgetStack->sizeHint() ); 324 QSize s( widgetStack->sizeHint() );
318 QSize t( tabBarStack->sizeHint() ); 325 QSize t( tabBarStack->sizeHint() );
319 return QSize( QMAX( s.width(), t.width()), s.height() + t.height() ); 326 return QSize( QMAX( s.width(), t.width() ), s.height() + t.height() );
320} 327}
321 328
322void OTabWidget::resizeEvent( QResizeEvent * ) 329void OTabWidget::resizeEvent( QResizeEvent * )