summaryrefslogtreecommitdiff
path: root/libopie2/opieui
Side-by-side diff
Diffstat (limited to 'libopie2/opieui') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/otabwidget.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp
index ae396b9..8d7806c 100644
--- a/libopie2/opieui/otabwidget.cpp
+++ b/libopie2/opieui/otabwidget.cpp
@@ -390,2 +390,13 @@ void OTabWidget::selectTab( OTabInfo *tab )
setUpLayout();
+
+ QSize t;
+
+ t = m_tabBar->sizeHint();
+ if ( t.width() > width() )
+ t.setWidth( width() );
+ int lw = m_widgetStack->lineWidth();
+ if ( m_tabBarPosition == Bottom )
+ m_tabBar->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() );
+ else
+ m_tabBar->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() );
}
@@ -420,7 +431,10 @@ void OTabWidget::resizeEvent( QResizeEvent * )
t = m_tabBar->sizeHint();
+ if ( t.width() > width() )
+ t.setWidth( width() );
}
else
+ {
t = m_tabList->sizeHint();
-
t.setWidth( width() );
+ }