mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -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:
parent
0f56eaed6b
commit
48c6517305
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user