diff --git a/src/PowerHist.cpp b/src/PowerHist.cpp index 1d5eab89c..d111cb77e 100644 --- a/src/PowerHist.cpp +++ b/src/PowerHist.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -157,7 +158,7 @@ PowerHist::configChanged() } // use a linear gradient - brush_color.setAlpha(64); + brush_color.setAlpha(GColor(CPLOTBACKGROUND) == QColor(Qt::white) ? 64 : 200); QColor brush_color1 = brush_color.darker(); QLinearGradient linearGradient(0, 0, 0, height()); linearGradient.setColorAt(0.0, brush_color); @@ -179,13 +180,24 @@ PowerHist::configChanged() ivl.setWidth(width); curveSelected->setPen(ivl); QColor ivlbrush = GColor(CINTERVALHIGHLIGHTER); - ivlbrush.setAlpha(64); + ivlbrush.setAlpha(GColor(CPLOTBACKGROUND) == QColor(Qt::white) ? 64 : 200); curveSelected->setBrush(ivlbrush); // fill below the line // grid QPen gridPen(GColor(CPLOTGRID)); //gridPen.setStyle(Qt::DotLine); grid->setPen(gridPen); + + QPalette palette; + palette.setBrush(QPalette::Window, QBrush(GColor(CPLOTBACKGROUND))); + palette.setColor(QPalette::WindowText, GColor(CPLOTMARKER)); + palette.setColor(QPalette::Text, GColor(CPLOTMARKER)); + setPalette(palette); + + axisWidget(QwtPlot::xBottom)->setPalette(palette); + axisWidget(QwtPlot::yLeft)->setPalette(palette); + + setAutoFillBackground(true); } PowerHist::~PowerHist() {