summaryrefslogtreecommitdiff
path: root/libopie2
authordrw <drw>2005-08-09 18:10:46 (UTC)
committer drw <drw>2005-08-09 18:10:46 (UTC)
commit2630b8b81ddf6904379eedab4e3c307ee6399863 (patch) (side-by-side diff)
treef88ea9ff42e77c322136de6dea4c5cb16e3e225e /libopie2
parent438e79dd18c8b752f1e7d74a79f3cdf84f8703c8 (diff)
downloadopie-2630b8b81ddf6904379eedab4e3c307ee6399863.zip
opie-2630b8b81ddf6904379eedab4e3c307ee6399863.tar.gz
opie-2630b8b81ddf6904379eedab4e3c307ee6399863.tar.bz2
Fix for bug #1682 - correct sizing of tab control
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/otabwidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp
index d617a9c..7103884 100644
--- a/libopie2/opieui/otabwidget.cpp
+++ b/libopie2/opieui/otabwidget.cpp
@@ -116,16 +116,19 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab
m_widgetStack->addWidget( child, tabid );
m_widgetStack->raiseWidget( child );
m_widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
// Keep track of tab information
OTabInfo *tabinfo = new OTabInfo( tabid, child, icon, label );
m_tabs.append( tabinfo );
+ // Force resizing of child controls
+ resizeEvent( 0x0 );
+
// Make newly added tab the current one displayed
selectTab( tabinfo );
}
void OTabWidget::removePage( QWidget *childwidget )
{
if ( childwidget )
{
@@ -162,16 +165,19 @@ void OTabWidget::removePage( QWidget *childwidget )
// Reset current tab
m_currTab = m_tabs.current();
if ( !m_currTab )
m_widgetStack->setFrameStyle( QFrame::NoFrame );
// Redraw widget
setUpLayout();
}
+
+ // Force resizing of child controls
+ resizeEvent( 0x0 );
}
}
void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QString &label)
{
// Find tab information for desired widget
OTabInfo *currtab = m_tabs.first();
while ( currtab && currtab->control() != widget )
@@ -203,16 +209,19 @@ void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QStri
m_tabList->changeItem( label, i );
}
}
// Update tab information
currtab->setLabel( label );
currtab->setIcon( iconset );
+ // Force resizing of child controls
+ resizeEvent( 0x0 );
+
// Redraw widget
setUpLayout();
}
}
void OTabWidget::setCurrentTab( QWidget *childwidget )
{
OTabInfo *currtab = m_tabs.first();