diff --git a/ApplicationCode/UserInterface/RiuCvfOverlayItemWidget.cpp b/ApplicationCode/UserInterface/RiuCvfOverlayItemWidget.cpp index 35b98d8b43..4ba0ae163a 100644 --- a/ApplicationCode/UserInterface/RiuCvfOverlayItemWidget.cpp +++ b/ApplicationCode/UserInterface/RiuCvfOverlayItemWidget.cpp @@ -33,7 +33,11 @@ RiuCvfOverlayItemWidget::RiuCvfOverlayItemWidget(QWidget* parent/*=0*/) : 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); this->layout()->addWidget(m_overlayItemLabel); } diff --git a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp index 589d5869f2..8a5e77c320 100644 --- a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp @@ -178,7 +178,7 @@ void RiuSummaryQwtPlot::addOrUpdateEnsembleCurveSetLegend(RimEnsembleCurveSet * new RiuWidgetDragger(overlayWidget); m_ensembleLegendWidgets[curveSetToShowLegendFor] = overlayWidget; - overlayWidget->move(30, 30); + overlayWidget->move(65, 30); } else { @@ -187,6 +187,9 @@ void RiuSummaryQwtPlot::addOrUpdateEnsembleCurveSetLegend(RimEnsembleCurveSet * if ( overlayWidget ) { + caf::TitledOverlayFrame* overlyItem = curveSetToShowLegendFor->legendConfig()->titledOverlayFrame(); + overlyItem->setRenderSize(overlyItem->preferredSize()); + overlayWidget->updateFromOverlyItem(curveSetToShowLegendFor->legendConfig()->titledOverlayFrame()); overlayWidget->show(); }