libui: Remove redundant statement
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
apio 2023-08-03 18:32:58 +02:00
parent 8bff3d647e
commit 37731d2a95
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -9,16 +9,8 @@ namespace ui
Canvas Canvas::subcanvas(Rect rect) Canvas Canvas::subcanvas(Rect rect)
{ {
if (rect.pos.x < 0) if (rect.pos.x < 0) rect.pos.x = 0;
{ if (rect.pos.y < 0) rect.pos.y = 0;
rect.pos.x = 0;
rect.width = rect.width + rect.pos.x;
}
if (rect.pos.y < 0)
{
rect.pos.y = 0;
rect.height = rect.height + rect.pos.y;
}
if (rect.pos.x + rect.width > width) rect.width = width - rect.pos.x; if (rect.pos.x + rect.width > width) rect.width = width - rect.pos.x;
if (rect.pos.y + rect.height > height) rect.height = height - rect.pos.y; if (rect.pos.y + rect.height > height) rect.height = height - rect.pos.y;