mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:32:43 +00:00 
			
		
		
		
	Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
		
							parent
							
								
									9561ec15f4
								
							
						
					
					
						commit
						77ad0fdb07
					
				
					 64 changed files with 136 additions and 288 deletions
				
			
		|  | @ -23,8 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|     auto main_widget = TRY(window->set_main_widget<GUI::Widget>()); | ||||
|     main_widget->set_fill_with_background_color(true); | ||||
| 
 | ||||
|     auto layout = TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>()); | ||||
|     layout->set_margins(16); | ||||
|     (void)TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(16)); | ||||
| 
 | ||||
|     auto button = TRY(main_widget->try_add<GUI::Button>("Click me!")); | ||||
|     button->on_click = [&](auto) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Atkins
						Sam Atkins