mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibGUI: GTabWidget should not set children to have negative size
This could happen if a child was added to a GTabWidget before the GTabWidget had its first layout. Also add an assertion to catch this in GWidget::set_relative_rect() since it was not immediately obvious what was happening.
This commit is contained in:
parent
93dff5df34
commit
b916e34fed
Notes:
sideshowbarker
2024-07-19 11:34:14 +09:00
Author: https://github.com/awesomekling
Commit: b916e34fed
2 changed files with 10 additions and 3 deletions
|
@ -44,6 +44,8 @@ void GWidget::child_event(CChildEvent& event)
|
|||
|
||||
void GWidget::set_relative_rect(const Rect& rect)
|
||||
{
|
||||
ASSERT(rect.width() >= 0 && rect.height() >= 0);
|
||||
|
||||
if (rect == m_relative_rect)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue