summaryrefslogtreecommitdiff
path: root/libopie/otabwidget.cpp
authorharlekin <harlekin>2002-10-15 12:00:44 (UTC)
committer harlekin <harlekin>2002-10-15 12:00:44 (UTC)
commitde2932def475a128e68fff23395b0ed5c41026f5 (patch) (side-by-side diff)
treefc526521b4540535cf80fd222c15c4054c481aca /libopie/otabwidget.cpp
parentb6fb59110629634056be3dd5c3091e6ed3271fd0 (diff)
downloadopie-de2932def475a128e68fff23395b0ed5c41026f5.zip
opie-de2932def475a128e68fff23395b0ed5c41026f5.tar.gz
opie-de2932def475a128e68fff23395b0ed5c41026f5.tar.bz2
update by drw to make appearance nicer when no tab is added
Diffstat (limited to 'libopie/otabwidget.cpp') (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
@@ -66,9 +66,9 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi
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" );
@@ -131,8 +131,9 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab
}
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 );
@@ -163,8 +164,13 @@ void OTabWidget::removePage( QWidget *childwidget )
widgetStack->removeWidget( childwidget );
tabs.remove( tab );
delete tab;
currentTab = tabs.current();
+ if ( !currentTab )
+ {
+ widgetStack->setFrameStyle( QFrame::NoFrame );
+ }
+
setUpLayout();
}
}
}