mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10785 Work-around for legend item disappearing when highlighted
Seen on Linux only. The legend item would be wider than anticipated by the layout (for unknown reasons), and would be place on the next line. Added extra with to the size hint to work around the problem.
This commit is contained in:
@@ -91,7 +91,10 @@ QSize RiuQwtPlotLegend::sizeHint() const
|
||||
|
||||
if ( legendLayout->itemCount() % numColumns ) numRows++;
|
||||
|
||||
int width = numColumns * legendLayout->maxItemWidth();
|
||||
// Extra width to workaround layout issue on linux
|
||||
// https://github.com/OPM/ResInsight/issues/10785
|
||||
const int extraWidth = 20;
|
||||
const int width = numColumns * legendLayout->maxItemWidth() + extraWidth;
|
||||
|
||||
int maxHeight = 0;
|
||||
for ( unsigned int i = 0; i < legendLayout->itemCount(); ++i )
|
||||
|
||||
Reference in New Issue
Block a user