Commit 2cc261a1 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Use timeline theme also for flame graph



Flame graph and timeline are similar in visual appearance, so they can
share theme settings.

Change-Id: I2e078fd8aa55d3b21e31abc82b967093623a2ab3
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 8448f412
......@@ -28,6 +28,8 @@
#include "qmlprofilertool.h"
#include <flamegraph/flamegraph.h>
#include <timeline/timelinetheme.h>
#include <utils/theme/theme.h>
#include <QQmlEngine>
#include <QQmlContext>
......@@ -53,9 +55,11 @@ FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent
qmlRegisterUncreatableType<QAbstractItemModel>("AbstractItemModel", 1, 0, "AbstractItemModel",
QLatin1String("only for Qt 5.4"));
Timeline::TimelineTheme::setupTheme(m_content->engine());
m_content->rootContext()->setContextProperty(QStringLiteral("flameGraphModel"), m_model);
m_content->setSource(QUrl(QStringLiteral("qrc:/qmlprofiler/QmlProfilerFlameGraphView.qml")));
m_content->setClearColor(QColor(0xdc, 0xdc, 0xdc));
m_content->setClearColor(Utils::creatorTheme()->color(Utils::Theme::Timeline_BackgroundColor1));
m_content->setResizeMode(QQuickWidget::SizeRootObjectToView);
m_content->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
......
......@@ -67,7 +67,7 @@ ScrollView {
property color blue2: Qt.rgba(0.375, 0, 1, 1)
property color grey1: "#B0B0B0"
property color grey2: "#A0A0A0"
property color orange: "orange"
property color highlight: creatorTheme.Timeline_HighlightColor
function checkBindingLoop(otherTypeId) {return false;}
......@@ -97,7 +97,7 @@ ScrollView {
else if (tooltip.hoveredNode === flamegraphItem)
return flamegraph.blue1;
else if (note() !== "" || isBindingLoop)
return flamegraph.orange;
return flamegraph.highlight;
else
return flamegraph.grey1;
}
......@@ -239,6 +239,15 @@ ScrollView {
minimumY: flickable.contentY
maximumY: flickable.contentY + flickable.height
titleBarColor: creatorTheme.Timeline_PanelHeaderColor
titleBarTextColor: creatorTheme.PanelTextColorLight
contentColor: creatorTheme.Timeline_PanelBackgroundColor
contentTextColor: creatorTheme.Timeline_TextColor
noteTextColor: creatorTheme.Timeline_HighlightColor
buttonHoveredColor: creatorTheme.FancyToolButtonHoverColor
buttonSelectedColor: creatorTheme.FancyToolButtonSelectedColor
borderWidth: 0
property var hoveredNode: null;
property var selectedNode: null;
......
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