QmlProfiler, PerfProfiler: Properly style panel widgets

We need to set the "panelwidget" property for the foreground color to be
set. Now that we do this correctly we don't need to hack around in the
palette anymore in QmlProfiler.

Change-Id: Icdc737e1c74d16ec76a12dbbdf6f8f64062bd19c
Fixes: QTCREATORBUG-21961
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Ulf Hermann
2019-02-11 12:24:27 +01:00
parent f6dcc90a6f
commit 8789c5ab71
2 changed files with 3 additions and 3 deletions

View File

@@ -164,7 +164,9 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) :
m_filterMenu = new QMenu(m_filterButton);
m_aggregateButton = new QToolButton;
m_recordedLabel = new QLabel;
m_recordedLabel->setProperty("panelwidget", true);
m_delayLabel = new QLabel;
m_delayLabel->setProperty("panelwidget", true);
m_perspective.setAboutToActivateCallback([this]() { createViews(); });
}

View File

@@ -213,9 +213,7 @@ QmlProfilerTool::QmlProfilerTool()
this, &QmlProfilerTool::toggleVisibleFeature);
d->m_timeLabel = new QLabel();
QPalette palette;
palette.setColor(QPalette::WindowText, Qt::white);
d->m_timeLabel->setPalette(palette);
d->m_timeLabel->setProperty("panelwidget", true);
d->m_timeLabel->setIndent(10);
updateTimeDisplay();
connect(d->m_timeLabel, &QObject::destroyed, &d->m_recordingTimer, &QTimer::stop);