mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
LibGUI: Call GWidget::resize_event() before doing widget layout
The widget layout system currently works by having layouts size the children of a widgets. The children then get resize events, giving them a chance to lay out their own children, etc. In keeping with this, we need to handle the resize event before calling do_layout() in a widget, since the resize event handler may do things that end up affecting the layout, but layout should not affect the resize event since the event comes from the widget parent, not itself.
This commit is contained in:
parent
aaaf04f393
commit
57f55f297b
Notes:
sideshowbarker
2024-07-19 10:33:11 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/57f55f297b6
@ -227,8 +227,8 @@ void GWidget::notify_layout_changed(Badge<GLayout>)
|
||||
|
||||
void GWidget::handle_resize_event(GResizeEvent& event)
|
||||
{
|
||||
resize_event(event);
|
||||
do_layout();
|
||||
return resize_event(event);
|
||||
}
|
||||
|
||||
void GWidget::handle_mouseup_event(GMouseEvent& event)
|
||||
|
Loading…
Reference in New Issue
Block a user