mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve canvas top alignment in well log plots
This commit is contained in:
parent
4fd9562b4b
commit
62817054c4
@ -694,7 +694,7 @@ void RimWellLogTrack::updateXAxisAndGridTickIntervals()
|
|||||||
if ( emptyRange )
|
if ( emptyRange )
|
||||||
{
|
{
|
||||||
m_plotWidget->enableGridLines( QwtPlot::xTop, false, false );
|
m_plotWidget->enableGridLines( QwtPlot::xTop, false, false );
|
||||||
m_plotWidget->setAxisRange( QwtPlot::xTop, 0.0, 0.0 );
|
m_plotWidget->setAxisRange( QwtPlot::xTop, 0.0, 1.0 );
|
||||||
m_plotWidget->setAxisLabelsAndTicksEnabled( QwtPlot::xTop, false );
|
m_plotWidget->setAxisLabelsAndTicksEnabled( QwtPlot::xTop, false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -245,8 +245,6 @@ void RiuQwtPlotWidget::setAxisLabelsAndTicksEnabled( QwtPlot::Axis axis, bool en
|
|||||||
{
|
{
|
||||||
this->axisScaleDraw( axis )->enableComponent( QwtAbstractScaleDraw::Ticks, enable );
|
this->axisScaleDraw( axis )->enableComponent( QwtAbstractScaleDraw::Ticks, enable );
|
||||||
this->axisScaleDraw( axis )->enableComponent( QwtAbstractScaleDraw::Labels, enable );
|
this->axisScaleDraw( axis )->enableComponent( QwtAbstractScaleDraw::Labels, enable );
|
||||||
axisScaleDraw( axis )->setMinimumExtent( axisExtent( axis ) );
|
|
||||||
setMinimumWidth( defaultMinimumWidth() + axisExtent( axis ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -341,12 +339,8 @@ int RiuQwtPlotWidget::axisExtent( QwtPlot::Axis axis ) const
|
|||||||
{
|
{
|
||||||
int lineExtent = 5;
|
int lineExtent = 5;
|
||||||
|
|
||||||
if ( this->axisScaleDraw( axis )->hasComponent( QwtAbstractScaleDraw::Ticks ) )
|
lineExtent += this->axisScaleDraw( axis )->maxTickLength();
|
||||||
{
|
|
||||||
lineExtent += this->axisScaleDraw( axis )->maxTickLength();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( this->axisScaleDraw( axis )->hasComponent( QwtAbstractScaleDraw::Labels ) )
|
|
||||||
{
|
{
|
||||||
QFont tickLabelFont = axisFont( axis );
|
QFont tickLabelFont = axisFont( axis );
|
||||||
// Make space for a fairly long value label
|
// Make space for a fairly long value label
|
||||||
|
Loading…
Reference in New Issue
Block a user