diff --git a/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp b/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp index 9c6833f889..826f1ba18f 100644 --- a/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp +++ b/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp @@ -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 ) ) ); } diff --git a/ApplicationCode/UserInterface/RiuQwtPlotLegend.cpp b/ApplicationCode/UserInterface/RiuQwtPlotLegend.cpp index 2a8b0c3439..369b8aebe5 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotLegend.cpp +++ b/ApplicationCode/UserInterface/RiuQwtPlotLegend.cpp @@ -36,6 +36,7 @@ RiuQwtPlotLegend::RiuQwtPlotLegend( QWidget* parent /*= nullptr */ ) { legendLayout->setExpandingDirections( Qt::Horizontal | Qt::Vertical ); } + setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuQwtPlotWidget.cpp b/ApplicationCode/UserInterface/RiuQwtPlotWidget.cpp index 2d5859ec85..2ac63f158c 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotWidget.cpp +++ b/ApplicationCode/UserInterface/RiuQwtPlotWidget.cpp @@ -74,6 +74,8 @@ RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlot* plotDefinition, QWidget* parent ) this->installEventFilter( this ); this->canvas()->installEventFilter( this ); + + this->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); } //--------------------------------------------------------------------------------------------------