1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 06:17:35 +00:00

GWidget: On second thought, don't assert on negative sizes in rects

Just neutralize incoming negative-size rects in set_relative_rect().
This commit is contained in:
Andreas Kling 2019-10-23 20:50:01 +02:00
parent 5f5f837ec5
commit 41289e652f

View file

@ -42,9 +42,9 @@ void GWidget::child_event(CChildEvent& event)
return CObject::child_event(event);
}
void GWidget::set_relative_rect(const Rect& rect)
void GWidget::set_relative_rect(const Rect& a_rect)
{
ASSERT(rect.width() >= 0 && rect.height() >= 0);
Rect rect = a_rect.is_empty() ? Rect() : a_rect;
if (rect == m_relative_rect)
return;