mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6514 Dark Theme : Use markerColor for tracker symbol and text in plots
This commit is contained in:
parent
4841d19d02
commit
c53c72b4c3
@ -19,7 +19,17 @@
|
||||
|
||||
#include "RiaFontCache.h"
|
||||
|
||||
#include "RimGridCrossPlot.h"
|
||||
#include "RimGridCrossPlotCurve.h"
|
||||
#include "RimGridCrossPlotDataSet.h"
|
||||
#include "RimPlot.h"
|
||||
#include "RimPlotAxisAnnotation.h"
|
||||
#include "RimPlotAxisProperties.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "RiuCvfOverlayItemWidget.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
#include "RiuPlotAnnotationTool.h"
|
||||
#include "RiuQwtCurvePointTracker.h"
|
||||
#include "RiuQwtPlotTools.h"
|
||||
#include "RiuQwtPlotWheelZoomer.h"
|
||||
@ -27,21 +37,11 @@
|
||||
#include "RiuRimQwtPlotCurve.h"
|
||||
#include "RiuWidgetDragger.h"
|
||||
|
||||
#include "RimGridCrossPlot.h"
|
||||
#include "RimGridCrossPlotCurve.h"
|
||||
#include "RimGridCrossPlotDataSet.h"
|
||||
#include "RimPlot.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
#include "cafFixedAtlasFont.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafTitledOverlayFrame.h"
|
||||
|
||||
#include "RimPlotAxisAnnotation.h"
|
||||
#include "RimPlotAxisProperties.h"
|
||||
#include "RiuPlotAnnotationTool.h"
|
||||
|
||||
#include "qwt_legend.h"
|
||||
#include "qwt_legend_label.h"
|
||||
#include "qwt_plot_panner.h"
|
||||
@ -92,8 +92,10 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
|
||||
m_selectedPointMarker = new QwtPlotMarker;
|
||||
|
||||
// QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker
|
||||
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
|
||||
QwtSymbol* mySymbol =
|
||||
new QwtSymbol( QwtSymbol::Ellipse, QBrush( QColor( 255, 255, 255, 50 ) ), QPen( Qt::black, 2.0 ), QSize( 10, 10 ) );
|
||||
new QwtSymbol( QwtSymbol::Ellipse, QBrush( QColor( 255, 255, 255, 50 ) ), QPen( color, 2.0 ), QSize( 10, 10 ) );
|
||||
|
||||
m_selectedPointMarker->setSymbol( mySymbol );
|
||||
m_selectedPointMarker->setLabelAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||
m_selectedPointMarker->setSpacing( 3 );
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "RiuQwtCurvePointTracker.h"
|
||||
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
|
||||
#include "qwt_plot_marker.h"
|
||||
#include "qwt_symbol.h"
|
||||
@ -44,8 +45,7 @@ RiuQwtCurvePointTracker::RiuQwtCurvePointTracker( QwtPlot* pl
|
||||
this->setTrackerMode( QwtPicker::AlwaysOn );
|
||||
m_plotMarker = new QwtPlotMarker;
|
||||
|
||||
// Get text color from palette
|
||||
QColor color = plot->palette().color( QPalette::Text );
|
||||
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
|
||||
|
||||
// QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker
|
||||
QwtSymbol* mySymbol = new QwtSymbol( QwtSymbol::Ellipse, Qt::NoBrush, QPen( color, 2.0 ), QSize( 12, 12 ) );
|
||||
@ -121,6 +121,9 @@ QwtText RiuQwtCurvePointTracker::trackerText( const QPoint& pos ) const
|
||||
updateClosestCurvePointMarker( closestPoint, relatedXAxis, relatedYAxis );
|
||||
}
|
||||
|
||||
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
|
||||
txt.setColor( color );
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user