mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure legend items don't disappear when area gets smaller
This commit is contained in:
@@ -82,7 +82,7 @@ RiuMultiPlotWindow::RiuMultiPlotWindow( RimMultiPlotWindow* plotDefinition, QWid
|
|||||||
m_gridLayout->setSpacing( 1 );
|
m_gridLayout->setSpacing( 1 );
|
||||||
|
|
||||||
QPalette newPalette( palette() );
|
QPalette newPalette( palette() );
|
||||||
newPalette.setColor( QPalette::Background, Qt::white );
|
newPalette.setColor( QPalette::Window, Qt::white );
|
||||||
setPalette( newPalette );
|
setPalette( newPalette );
|
||||||
|
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
@@ -159,8 +159,8 @@ void RiuMultiPlotWindow::insertPlot( RiuQwtPlotWidget* plotWidget, size_t index
|
|||||||
}
|
}
|
||||||
legend->setMaxColumns( legendColumns );
|
legend->setMaxColumns( legendColumns );
|
||||||
legend->horizontalScrollBar()->setVisible( false );
|
legend->horizontalScrollBar()->setVisible( false );
|
||||||
legend->verticalScrollBar()->setVisible( false );
|
legend->verticalScrollBar()->setVisible( true );
|
||||||
|
legend->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
|
||||||
legend->connect( plotWidget,
|
legend->connect( plotWidget,
|
||||||
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
|
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
|
||||||
SLOT( updateLegend( const QVariant&, const QList<QwtLegendData>& ) ) );
|
SLOT( updateLegend( const QVariant&, const QList<QwtLegendData>& ) ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user