diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-13 11:44:49 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-13 14:26:28 +0000 |
commit | 68f0d637a66de3a1878023e8ac19a6cb9ed54b50 (patch) | |
tree | d2cd607f80a6af379e0acac262961942d9eedc93 /src/plugins/qmlprofiler | |
parent | 27e9785ce806d44f6a96ad08455cd847c8312e36 (diff) | |
download | qt-creator-68f0d637a66de3a1878023e8ac19a6cb9ed54b50.tar.gz |
Timeline: Expose theme as singleton type
This allows us to look up the colors by their enum values, rather than
by strings. Lookup by string is prohibitively expensive as the whole
QVariantMap of theme values has to be converted into a JS object
repeatedly and the strings have to be converted between QString and
QV4:String all the time..
Change-Id: Id131840b1a6e1eaabbd8966d60b9baf1ebed00c1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml index 7a990855cb..88f4eb133f 100644 --- a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml +++ b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml @@ -27,6 +27,7 @@ import QtQuick 2.0 import QtQuick.Controls 1.3 import FlameGraph 1.0 import QmlProfilerFlameGraphModel 1.0 +import TimelineTheme 1.0 import "../flamegraph/" ScrollView { @@ -67,7 +68,7 @@ ScrollView { property color blue2: Qt.rgba(0.375, 0, 1, 1) property color grey1: "#B0B0B0" property color grey2: "#A0A0A0" - property color highlight: creatorTheme.Timeline_HighlightColor + property color highlight: Theme.color(Theme.Timeline_HighlightColor) function checkBindingLoop(otherTypeId) {return false;} @@ -241,13 +242,13 @@ 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 + titleBarColor: Theme.color(Theme.Timeline_PanelHeaderColor) + titleBarTextColor: Theme.color(Theme.PanelTextColorLight) + contentColor: Theme.color(Theme.Timeline_PanelBackgroundColor) + contentTextColor: Theme.color(Theme.Timeline_TextColor) + noteTextColor: Theme.color(Theme.Timeline_HighlightColor) + buttonHoveredColor: Theme.color(Theme.FancyToolButtonHoverColor) + buttonSelectedColor: Theme.color(Theme.FancyToolButtonSelectedColor) borderWidth: 0 property var hoveredNode: null; |