From 944e37c47a663a475eb2d95f93a8acda3cb70be6 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 29 Oct 2018 16:24:36 +0000 Subject: [PATCH] Adjust colouring for pipeline flow chart, improve contrast. Closes #1141 * On the light theme we use a less dark background colour improving contrast with the text. * On the dark theme the background is still super dark, but we dim the outline colour which provides an indication of disabled stages --- qrenderdoc/Widgets/PipelineFlowChart.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qrenderdoc/Widgets/PipelineFlowChart.cpp b/qrenderdoc/Widgets/PipelineFlowChart.cpp index a53780dbc..267a58ac2 100644 --- a/qrenderdoc/Widgets/PipelineFlowChart.cpp +++ b/qrenderdoc/Widgets/PipelineFlowChart.cpp @@ -194,14 +194,14 @@ void PipelineFlowChart::paintEvent(QPaintEvent *e) const qreal arrowY = totalRect.y() + totalRect.height() / 2; - QColor base = palette().color(QPalette::Base); - QColor baseText = palette().color(QPalette::Text); - QColor inactiveWin = palette().color(QPalette::Inactive, QPalette::Dark); - QColor inactiveWinText = palette().color(QPalette::Inactive, QPalette::WindowText); + QColor enabledBase = palette().color(QPalette::Base); + QColor enabledText = palette().color(QPalette::Text); + QColor disabledBase = palette().color(QPalette::Disabled, QPalette::Base); + QColor disabledText = palette().color(QPalette::Disabled, QPalette::Text); QColor tooltip = palette().color(QPalette::ToolTipBase); QColor tooltipText = palette().color(QPalette::ToolTipText); - QPen pen(baseText); + QPen pen(enabledText); QPen selectedPen(Qt::red); int num = numGaps(); @@ -213,7 +213,7 @@ void PipelineFlowChart::paintEvent(QPaintEvent *e) float right = totalRect.x() + (i + 1) * (box0Rect.width() + boxMargin()); float left = right - boxMargin(); - p.setBrush(baseText); + p.setBrush(enabledText); drawArrow(p, pen, ArrowHeadSize, arrowY, left, right); } @@ -222,14 +222,14 @@ void PipelineFlowChart::paintEvent(QPaintEvent *e) { QRectF boxrect = boxRect(i); - QBrush backBrush(base); - QPen textPen(baseText); - QPen outlinePen = pen; + QBrush backBrush(enabledBase); + QPen textPen(enabledText); + QPen outlinePen(enabledText); if(!stageEnabled(i)) { - backBrush.setColor(inactiveWin); - textPen.setColor(inactiveWinText); + backBrush.setColor(disabledBase); + outlinePen.setColor(disabledText); } if(i == m_HoverStage)