(#616) Removed the legend scrollbars completely by keeping the legend with at required size.

This commit is contained in:
Jacob Støren 2015-12-02 13:58:10 +01:00
parent fa83513ac6
commit 76a90b04c8

View File

@ -291,8 +291,8 @@ void RiuWellLogPlot::placeChildWidgets(int height, int width)
realTrackWidth += 1; realTrackWidth += 1;
--trackWidthExtra; --trackWidthExtra;
} }
int realLegendWidth = std::max(realTrackWidth, m_legends[tIdx]->sizeHint().width());
m_legends[tIdx]->setGeometry(trackX, 0, realTrackWidth, maxLegendHeight); m_legends[tIdx]->setGeometry(trackX, 0, realLegendWidth, maxLegendHeight);
m_trackPlots[tIdx]->setGeometry(trackX, maxLegendHeight, realTrackWidth, trackHeight); m_trackPlots[tIdx]->setGeometry(trackX, maxLegendHeight, realTrackWidth, trackHeight);
trackX += realTrackWidth; trackX += realTrackWidth;
@ -301,7 +301,6 @@ void RiuWellLogPlot::placeChildWidgets(int height, int width)
} }
if (m_scrollBar->isVisible()) m_scrollBar->setGeometry(trackX, maxLegendHeight, scrollBarWidth, trackHeight); if (m_scrollBar->isVisible()) m_scrollBar->setGeometry(trackX, maxLegendHeight, scrollBarWidth, trackHeight);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------