Skip to content

Commit

Permalink
GraphPanel widget: also change the colour of the background surroundi…
Browse files Browse the repository at this point in the history
…ng the canvas (#1426).
  • Loading branch information
agarny committed Nov 7, 2017
1 parent 9042bc5 commit bd76da0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,15 @@ void GraphPanelPlotWidget::setColor(const QColor &pColor)
setCanvasBackground(brush);

// Set the colour of the background surrounding our canvas, which we
// make slightly darker than that of our canvas background colour
// make slightly darker than that of our canvas background colour, based
// on the typical colour used for a widget's background

QColor winColor = Core::windowColor();
QPalette pal = palette();

pal.setColor(QPalette::Window, color.darker(107));
pal.setColor(QPalette::Window, QColor(winColor.redF()*color.red(),
winColor.greenF()*color.green(),
winColor.blueF()*color.blue()));

setPalette(pal);

Expand Down

0 comments on commit bd76da0

Please sign in to comment.