attemp to fix #15870
This commit is contained in:
parent
0359fed313
commit
517ff5c8d7
|
@ -651,8 +651,8 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
//adapt borders (prevent weired overlapping/glitchy drawings)
|
//adapt borders (prevent weired overlapping/glitchy drawings)
|
||||||
int width = style_rect.size.width;
|
int width = MAX(style_rect.size.width, 0);
|
||||||
int height = style_rect.size.height;
|
int height = MAX(style_rect.size.height, 0);
|
||||||
int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
|
int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
|
||||||
adapt_values(MARGIN_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height);
|
adapt_values(MARGIN_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height);
|
||||||
adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width);
|
adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width);
|
||||||
|
|
Loading…
Reference in New Issue