Minor improvements to well log track layout

This commit is contained in:
Gaute Lindkvist 2020-01-16 15:34:14 +01:00
parent 1095165a64
commit c72532eb4e
3 changed files with 5 additions and 2 deletions

View File

@ -98,7 +98,7 @@ RiuMultiPlotPage::RiuMultiPlotPage( RimPlotWindow* plotDefinition, QWidget* pare
new RiuPlotObjectPicker( m_plotTitle, m_plotDefinition );
this->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::MinimumExpanding );
this->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
setFocusPolicy( Qt::StrongFocus );
@ -627,7 +627,7 @@ void RiuMultiPlotPage::reinsertPlotWidgets()
}
for ( int c = column; c < column + colSpan; ++c )
{
int colStretch = 6;
int colStretch = 6; // Empirically chosen to try to counter the width of the axis on the first track
if ( showYAxis( row, column ) ) colStretch += 1;
m_gridLayout->setColumnStretch( c, std::max( colStretch, m_gridLayout->columnStretch( c ) ) );
}

View File

@ -36,6 +36,7 @@ RiuQwtPlotLegend::RiuQwtPlotLegend( QWidget* parent /*= nullptr */ )
{
legendLayout->setExpandingDirections( Qt::Horizontal | Qt::Vertical );
}
setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
}
//--------------------------------------------------------------------------------------------------

View File

@ -74,6 +74,8 @@ RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlot* plotDefinition, QWidget* parent )
this->installEventFilter( this );
this->canvas()->installEventFilter( this );
this->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
}
//--------------------------------------------------------------------------------------------------