#6514 Dark Theme : Fix color of rubber band zoom

This commit is contained in:
Magne Sjaastad 2020-09-16 13:34:44 +02:00 committed by Gaute Lindkvist
parent c53c72b4c3
commit 26ff3e28c8
4 changed files with 6 additions and 6 deletions

View File

@ -140,9 +140,7 @@ RiuFlowCharacteristicsPlot::RiuFlowCharacteristicsPlot( RimFlowCharacteristicsPl
void RiuFlowCharacteristicsPlot::addWindowZoom( QwtPlot* plot ) void RiuFlowCharacteristicsPlot::addWindowZoom( QwtPlot* plot )
{ {
auto zoomer = new RiuQwtPlotZoomer( plot->canvas() ); auto zoomer = new RiuQwtPlotZoomer( plot->canvas() );
// zoomer->setRubberBandPen( QColor( Qt::black ) );
zoomer->setTrackerMode( QwtPicker::AlwaysOff ); zoomer->setTrackerMode( QwtPicker::AlwaysOff );
// zoomer->setTrackerPen( QColor( Qt::black ) );
zoomer->initMousePattern( 1 ); zoomer->initMousePattern( 1 );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -63,9 +63,7 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
{ {
// LeftButton for the zooming // LeftButton for the zooming
m_zoomerLeft = new RiuQwtPlotZoomer( canvas() ); m_zoomerLeft = new RiuQwtPlotZoomer( canvas() );
m_zoomerLeft->setRubberBandPen( QColor( Qt::black ) );
m_zoomerLeft->setTrackerMode( QwtPicker::AlwaysOff ); m_zoomerLeft->setTrackerMode( QwtPicker::AlwaysOff );
m_zoomerLeft->setTrackerPen( QColor( Qt::black ) );
m_zoomerLeft->initMousePattern( 1 ); m_zoomerLeft->initMousePattern( 1 );
// Attach a zoomer for the right axis // Attach a zoomer for the right axis

View File

@ -17,6 +17,8 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
#pragma once #pragma once
#include "RiuGuiTheme.h"
#include "qwt_plot_zoomer.h" #include "qwt_plot_zoomer.h"
#include <QMouseEvent> #include <QMouseEvent>
@ -27,6 +29,10 @@ public:
RiuQwtPlotZoomer( QWidget* canvas, bool doReplot = true ) RiuQwtPlotZoomer( QWidget* canvas, bool doReplot = true )
: QwtPlotZoomer( canvas, doReplot ) : QwtPlotZoomer( canvas, doReplot )
{ {
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
setRubberBandPen( color );
setTrackerPen( color );
} }
bool isActiveAndValid() const bool isActiveAndValid() const

View File

@ -103,9 +103,7 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent /*=
{ {
// LeftButton for the zooming // LeftButton for the zooming
m_zoomerLeft = new RiuQwtPlotZoomer( canvas() ); m_zoomerLeft = new RiuQwtPlotZoomer( canvas() );
m_zoomerLeft->setRubberBandPen( QColor( Qt::black ) );
m_zoomerLeft->setTrackerMode( QwtPicker::AlwaysOff ); m_zoomerLeft->setTrackerMode( QwtPicker::AlwaysOff );
m_zoomerLeft->setTrackerPen( QColor( Qt::black ) );
m_zoomerLeft->initMousePattern( 1 ); m_zoomerLeft->initMousePattern( 1 );
// Attach a zoomer for the right axis // Attach a zoomer for the right axis