summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp
index 6ef4034..aaf14ce 100644
--- a/libopie/otabwidget.cpp
+++ b/libopie/otabwidget.cpp
@@ -64,13 +64,13 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi
{
tabBarStyle = s;
tabBarPosition = p;
}
widgetStack = new QWidgetStack( this, "widgetstack" );
- widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
+ widgetStack->setFrameStyle( QFrame::NoFrame );
widgetStack->setLineWidth( style().defaultFrameWidth() );
tabBarStack = new QWidgetStack( this, "tabbarstack" );
tabBar = new OTabBar( tabBarStack, "tabbar" );
tabBarStack->addWidget( tabBar, 0 );
@@ -129,12 +129,13 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab
{
tabList->insertItem( label );
}
widgetStack->addWidget( child, tabid );
widgetStack->raiseWidget( child );
+ widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
OTabInfo *tabinfo = new OTabInfo( tabid, child, icon, label );
tabs.append( tabinfo );
selectTab( tabinfo );
}
@@ -161,12 +162,17 @@ void OTabWidget::removePage( QWidget *childwidget )
tabList->removeItem( i );
}
widgetStack->removeWidget( childwidget );
tabs.remove( tab );
delete tab;
currentTab = tabs.current();
+ if ( !currentTab )
+ {
+ widgetStack->setFrameStyle( QFrame::NoFrame );
+ }
+
setUpLayout();
}
}
}
void OTabWidget::setCurrentTab( QWidget *childwidget )