From 80cb8f464dad2d4eb3f3d4e53d302f04c3327545 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sun, 15 Dec 2013 23:28:18 +0000 Subject: [PATCH] LTM Plot honour plot background color .. more of the same as recently updated similarly for CP, PfPv, Histogram, AllPlot etc --- src/LTMPlot.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/LTMPlot.cpp b/src/LTMPlot.cpp index c2a608ca5..a26b52f00 100644 --- a/src/LTMPlot.cpp +++ b/src/LTMPlot.cpp @@ -49,6 +49,7 @@ LTMPlot::LTMPlot(LTMWindow *parent, Context *context) : { // don't do this .. setAutoReplot(false); + setAutoFillBackground(true); // setup my axes // for now we limit to 4 on left and 4 on right @@ -119,6 +120,19 @@ LTMPlot::configUpdate() 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); + + foreach (QwtAxisId x, supportedAxes) { + axisWidget(x)->setPalette(palette); + axisWidget(x)->setPalette(palette); + } + axisWidget(QwtPlot::xBottom)->setPalette(palette); + this->legend()->setPalette(palette); } void