summaryrefslogtreecommitdiff
path: root/libopie2/opieui
authordrw <drw>2005-03-03 21:05:50 (UTC)
committer drw <drw>2005-03-03 21:05:50 (UTC)
commitb92ff0d96359e7f383c5fc1c54271c3819bef413 (patch) (unidiff)
treeef1dc4c57f1af409464bc430c04a25e9d45aca6e /libopie2/opieui
parent67ddc501f2a52c7f35ca4044fb0094e759a45d76 (diff)
downloadopie-b92ff0d96359e7f383c5fc1c54271c3819bef413.zip
opie-b92ff0d96359e7f383c5fc1c54271c3819bef413.tar.gz
opie-b92ff0d96359e7f383c5fc1c54271c3819bef413.tar.bz2
Some minor fixes to drawing of tab bar
Diffstat (limited to 'libopie2/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/otabwidget.cpp18
1 files changed, 16 insertions, 2 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
@@ -388,6 +388,17 @@ void OTabWidget::selectTab( OTabInfo *tab )
388 m_tabBar->setCurrentTab( tab->id() ); 388 m_tabBar->setCurrentTab( tab->id() );
389 389
390 setUpLayout(); 390 setUpLayout();
391
392 QSize t;
393
394 t = m_tabBar->sizeHint();
395 if ( t.width() > width() )
396 t.setWidth( width() );
397 int lw = m_widgetStack->lineWidth();
398 if ( m_tabBarPosition == Bottom )
399 m_tabBar->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() );
400 else
401 m_tabBar->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() );
391 } 402 }
392 else if ( m_tabBarStyle == TextTab ) 403 else if ( m_tabBarStyle == TextTab )
393 { 404 {
@@ -418,11 +429,14 @@ void OTabWidget::resizeEvent( QResizeEvent * )
418 { 429 {
419 m_tabBar->layoutTabs(); 430 m_tabBar->layoutTabs();
420 t = m_tabBar->sizeHint(); 431 t = m_tabBar->sizeHint();
432 if ( t.width() > width() )
433 t.setWidth( width() );
421 } 434 }
422 else 435 else
436 {
423 t = m_tabList->sizeHint(); 437 t = m_tabList->sizeHint();
424 438 t.setWidth( width() );
425 t.setWidth( width() ); 439 }
426 440
427 int lw = m_widgetStack->lineWidth(); 441 int lw = m_widgetStack->lineWidth();
428 if ( m_tabBarPosition == Bottom ) 442 if ( m_tabBarPosition == Bottom )