forked from qt-creator/qt-creator
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:
@@ -164,7 +164,9 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) :
|
|||||||
m_filterMenu = new QMenu(m_filterButton);
|
m_filterMenu = new QMenu(m_filterButton);
|
||||||
m_aggregateButton = new QToolButton;
|
m_aggregateButton = new QToolButton;
|
||||||
m_recordedLabel = new QLabel;
|
m_recordedLabel = new QLabel;
|
||||||
|
m_recordedLabel->setProperty("panelwidget", true);
|
||||||
m_delayLabel = new QLabel;
|
m_delayLabel = new QLabel;
|
||||||
|
m_delayLabel->setProperty("panelwidget", true);
|
||||||
|
|
||||||
m_perspective.setAboutToActivateCallback([this]() { createViews(); });
|
m_perspective.setAboutToActivateCallback([this]() { createViews(); });
|
||||||
}
|
}
|
||||||
|
@@ -213,9 +213,7 @@ QmlProfilerTool::QmlProfilerTool()
|
|||||||
this, &QmlProfilerTool::toggleVisibleFeature);
|
this, &QmlProfilerTool::toggleVisibleFeature);
|
||||||
|
|
||||||
d->m_timeLabel = new QLabel();
|
d->m_timeLabel = new QLabel();
|
||||||
QPalette palette;
|
d->m_timeLabel->setProperty("panelwidget", true);
|
||||||
palette.setColor(QPalette::WindowText, Qt::white);
|
|
||||||
d->m_timeLabel->setPalette(palette);
|
|
||||||
d->m_timeLabel->setIndent(10);
|
d->m_timeLabel->setIndent(10);
|
||||||
updateTimeDisplay();
|
updateTimeDisplay();
|
||||||
connect(d->m_timeLabel, &QObject::destroyed, &d->m_recordingTimer, &QTimer::stop);
|
connect(d->m_timeLabel, &QObject::destroyed, &d->m_recordingTimer, &QTimer::stop);
|
||||||
|
Reference in New Issue
Block a user