mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4341 Make docked plots follow font size preferences (but subtract 1 in point size)
* The docked plots have much less space available than most plots
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
|
||||
#include "RiuResultQwtPlot.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaCurveDataTools.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
|
||||
#include "RimContextCommandBuilder.h"
|
||||
@@ -50,7 +52,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuResultQwtPlot::RiuResultQwtPlot(QWidget* parent)
|
||||
: QwtPlot(parent)
|
||||
: RiuDockedQwtPlot(parent)
|
||||
{
|
||||
setDefaults();
|
||||
}
|
||||
@@ -84,6 +86,7 @@ void RiuResultQwtPlot::addCurve(const RimCase* rimCase, const QString& curveName
|
||||
m_plotCurves.push_back(plotCurve);
|
||||
|
||||
this->setAxisScale( QwtPlot::xTop, QwtDate::toDouble(dateTimes.front()), QwtDate::toDouble(dateTimes.back()));
|
||||
this->applyFontSizes(false);
|
||||
|
||||
this->replot();
|
||||
|
||||
@@ -185,6 +188,8 @@ void RiuResultQwtPlot::setDefaults()
|
||||
setAxisMaxMinor(QwtPlot::xBottom, 2);
|
||||
setAxisMaxMinor(QwtPlot::yLeft, 3);
|
||||
|
||||
applyFontSizes(false);
|
||||
|
||||
// The legend will be deleted in the destructor of the plot or when
|
||||
// another legend is inserted.
|
||||
QwtLegend* legend = new QwtLegend(this);
|
||||
|
||||
Reference in New Issue
Block a user