mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:02:46 +00: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
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -227,8 +227,8 @@ void GWidget::notify_layout_changed(Badge<GLayout>) | ||||||
| 
 | 
 | ||||||
| void GWidget::handle_resize_event(GResizeEvent& event) | void GWidget::handle_resize_event(GResizeEvent& event) | ||||||
| { | { | ||||||
|  |     resize_event(event); | ||||||
|     do_layout(); |     do_layout(); | ||||||
|     return resize_event(event); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void GWidget::handle_mouseup_event(GMouseEvent& event) | void GWidget::handle_mouseup_event(GMouseEvent& event) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling