mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2657 Better initial position of Ensemble curve color legend. Use preferred size
This commit is contained in:
parent
3957027b4b
commit
72fc66f827
@ -33,7 +33,11 @@
|
|||||||
RiuCvfOverlayItemWidget::RiuCvfOverlayItemWidget(QWidget* parent/*=0*/)
|
RiuCvfOverlayItemWidget::RiuCvfOverlayItemWidget(QWidget* parent/*=0*/)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
this->setLayout(new QHBoxLayout(this));
|
auto hblayout = new QHBoxLayout(this);
|
||||||
|
hblayout->setMargin(0);
|
||||||
|
hblayout->setSpacing(0);
|
||||||
|
|
||||||
|
this->setLayout(hblayout);
|
||||||
m_overlayItemLabel = new QLabel(this);
|
m_overlayItemLabel = new QLabel(this);
|
||||||
this->layout()->addWidget(m_overlayItemLabel);
|
this->layout()->addWidget(m_overlayItemLabel);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ void RiuSummaryQwtPlot::addOrUpdateEnsembleCurveSetLegend(RimEnsembleCurveSet *
|
|||||||
new RiuWidgetDragger(overlayWidget);
|
new RiuWidgetDragger(overlayWidget);
|
||||||
|
|
||||||
m_ensembleLegendWidgets[curveSetToShowLegendFor] = overlayWidget;
|
m_ensembleLegendWidgets[curveSetToShowLegendFor] = overlayWidget;
|
||||||
overlayWidget->move(30, 30);
|
overlayWidget->move(65, 30);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -187,6 +187,9 @@ void RiuSummaryQwtPlot::addOrUpdateEnsembleCurveSetLegend(RimEnsembleCurveSet *
|
|||||||
|
|
||||||
if ( overlayWidget )
|
if ( overlayWidget )
|
||||||
{
|
{
|
||||||
|
caf::TitledOverlayFrame* overlyItem = curveSetToShowLegendFor->legendConfig()->titledOverlayFrame();
|
||||||
|
overlyItem->setRenderSize(overlyItem->preferredSize());
|
||||||
|
|
||||||
overlayWidget->updateFromOverlyItem(curveSetToShowLegendFor->legendConfig()->titledOverlayFrame());
|
overlayWidget->updateFromOverlyItem(curveSetToShowLegendFor->legendConfig()->titledOverlayFrame());
|
||||||
overlayWidget->show();
|
overlayWidget->show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user