mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#51 Avoid that legend background misses frame line on the right
This commit is contained in:
parent
7bd08067a9
commit
7a9e53bdb1
@ -187,7 +187,7 @@ void CategoryLegend::renderGeneric(OpenGLContext* oglContext,
|
||||
TextDrawer textDrawer(m_font.p());
|
||||
setupTextDrawer(&textDrawer, &layout, &maxLegendRightPos);
|
||||
|
||||
Vec2f backgroundSize(maxLegendRightPos + 3.0f, (float)size.y());
|
||||
Vec2f backgroundSize(CVF_MIN(maxLegendRightPos + 3.0f, (float)size.x()), (float)size.y());
|
||||
|
||||
// Do the actual rendering
|
||||
if (software)
|
||||
|
@ -245,8 +245,8 @@ void OverlayScalarMapperLegend::renderGeneric(OpenGLContext* oglContext, const V
|
||||
float maxLegendRightPos = 0;
|
||||
TextDrawer textDrawer(m_font.p());
|
||||
setupTextDrawer(&textDrawer, &layout, &maxLegendRightPos);
|
||||
|
||||
Vec2f backgroundSize(maxLegendRightPos + 3.0f, (float)size.y());
|
||||
|
||||
Vec2f backgroundSize(CVF_MIN(maxLegendRightPos + 3.0f, (float)size.x()), (float)size.y());
|
||||
|
||||
// Do the actual rendering
|
||||
if (software)
|
||||
|
Loading…
Reference in New Issue
Block a user