Commit dafdf290 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: prepare centerWidget to use styled QTabWidget

Change-Id: Ibcc6e7d5866df50448b54ecc4f2aff340b353f77
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 12ad7233
QWidget {
background-color: creatorTheme.QmlDesignerTabDark
}
QTabWidget#centralTabWidget::pane {
border: 0px;
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
}
QTabWidget#centralTabWidget::tab-bar { alignment: right; }
QTabBar::tab:selected {
border: none;
background-color: creatorTheme.QmlDesignerTabLight;
color: creatorTheme.QmlDesignerTabDark;
}
QTabBar::tab {
width: 16px;
height: 80px;
border-image: none;
background-color: creatorTheme.QmlDesignerTabDark;
color: creatorTheme.QmlDesignerTabLight;
margin-top: 0x;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
font: bold;
font-size: 11px;
}
......@@ -4,5 +4,6 @@
<file>stylesheet.css</file>
<file>scrollbar.css</file>
<file>formeditorstylesheet.css</file>
<file>centerwidget.css</file>
</qresource>
</RCC>
......@@ -471,7 +471,7 @@ void DesignModeWidget::addNavigatorHistoryEntry(const Utils::FileName &fileName)
++m_navigatorHistoryCounter;
}
static QWidget *createWidgetsInTabWidget(const QList<WidgetInfo> &widgetInfos)
static QTabWidget *createWidgetsInTabWidget(const QList<WidgetInfo> &widgetInfos)
{
QTabWidget *tabWidget = new QTabWidget;
......@@ -512,13 +512,18 @@ static Core::MiniSplitter *createCentralSplitter(const QList<WidgetInfo> &widget
auto outputPanePlaceholder = new StyledOutputpanePlaceHolder(Core::Constants::MODE_DESIGN, outputPlaceholderSplitter);
if (centralWidgetInfos.count() == 1)
outputPlaceholderSplitter->addWidget(centralWidgetInfos.first().widget);
else
outputPlaceholderSplitter->addWidget(createWidgetsInTabWidget(centralWidgetInfos));
QTabWidget* tabWidget = createWidgetsInTabWidget(centralWidgetInfos);
tabWidget->setObjectName("centralTabWidget");
tabWidget->setTabPosition(QTabWidget::East);
tabWidget->setTabBarAutoHide(true);
outputPlaceholderSplitter->addWidget(tabWidget);
outputPlaceholderSplitter->addWidget(outputPanePlaceholder);
QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/centerwidget.css");
tabWidget->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(sheet)));
outputPlaceholderSplitter->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(sheet)));
return outputPlaceholderSplitter;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment