Add one global option for customizing the stylesheet of the tabbar

Note: this is just an experimental idea, so no GUI is added. It might
rename or disappear later.
This commit is contained in:
Jekyll Wu
2012-05-05 02:26:23 +08:00
parent a0f502e1a2
commit cf24bea6ab
6 changed files with 24 additions and 1 deletions

View File

@@ -266,7 +266,6 @@ ViewContainerTabBar::ViewContainerTabBar(QWidget* parent, TabbedViewContainer* c
setDocumentMode(true);
setFocusPolicy(Qt::NoFocus);
setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
setStyleSheet("QTabBar::tab { min-width: 2em; max-width: 25em }");
setElideMode(Qt::ElideLeft);
}
void ViewContainerTabBar::setDropIndicator(int index, bool drawDisabled)
@@ -580,6 +579,11 @@ void TabbedViewContainer::dynamicTabBarVisibility()
setTabBarVisible(false);
}
void TabbedViewContainer::setStyleSheet(const QString& styleSheet)
{
_tabBar->setStyleSheet(styleSheet);
}
void TabbedViewContainer::navigationTextModeChanged(bool useTextWidth)
{
if (useTextWidth) {