mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.
As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
			
			
This commit is contained in:
		
							parent
							
								
									0154ce2c8d
								
							
						
					
					
						commit
						fc076ece3d
					
				
					 90 changed files with 1648 additions and 1648 deletions
				
			
		|  | @ -247,10 +247,10 @@ ThemeEditorPreview::ThemeEditorPreview() { | |||
| 
 | ||||
| 	preview_content = memnew(MarginContainer); | ||||
| 	preview_root->add_child(preview_content); | ||||
| 	preview_content->add_theme_constant_override(SNAME("margin_right"), 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override(SNAME("margin_top"), 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override(SNAME("margin_left"), 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override(SNAME("margin_bottom"), 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override("margin_right", 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override("margin_top", 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override("margin_left", 4 * EDSCALE); | ||||
| 	preview_content->add_theme_constant_override("margin_bottom", 4 * EDSCALE); | ||||
| 
 | ||||
| 	preview_overlay = memnew(MarginContainer); | ||||
| 	preview_overlay->set_mouse_filter(MOUSE_FILTER_IGNORE); | ||||
|  | @ -269,20 +269,20 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() { | |||
| 	preview_content->add_child(main_panel); | ||||
| 
 | ||||
| 	MarginContainer *main_mc = memnew(MarginContainer); | ||||
| 	main_mc->add_theme_constant_override(SNAME("margin_right"), 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override(SNAME("margin_top"), 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override(SNAME("margin_left"), 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override(SNAME("margin_bottom"), 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override("margin_right", 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override("margin_top", 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override("margin_left", 4 * EDSCALE); | ||||
| 	main_mc->add_theme_constant_override("margin_bottom", 4 * EDSCALE); | ||||
| 	preview_content->add_child(main_mc); | ||||
| 
 | ||||
| 	HBoxContainer *main_hb = memnew(HBoxContainer); | ||||
| 	main_mc->add_child(main_hb); | ||||
| 	main_hb->add_theme_constant_override(SNAME("separation"), 20 * EDSCALE); | ||||
| 	main_hb->add_theme_constant_override("separation", 20 * EDSCALE); | ||||
| 
 | ||||
| 	VBoxContainer *first_vb = memnew(VBoxContainer); | ||||
| 	main_hb->add_child(first_vb); | ||||
| 	first_vb->set_h_size_flags(SIZE_EXPAND_FILL); | ||||
| 	first_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE); | ||||
| 	first_vb->add_theme_constant_override("separation", 10 * EDSCALE); | ||||
| 
 | ||||
| 	first_vb->add_child(memnew(Label("Label"))); | ||||
| 
 | ||||
|  | @ -343,7 +343,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() { | |||
| 	VBoxContainer *second_vb = memnew(VBoxContainer); | ||||
| 	second_vb->set_h_size_flags(SIZE_EXPAND_FILL); | ||||
| 	main_hb->add_child(second_vb); | ||||
| 	second_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE); | ||||
| 	second_vb->add_theme_constant_override("separation", 10 * EDSCALE); | ||||
| 	LineEdit *le = memnew(LineEdit); | ||||
| 	le->set_text("LineEdit"); | ||||
| 	second_vb->add_child(le); | ||||
|  | @ -383,7 +383,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() { | |||
| 
 | ||||
| 	VBoxContainer *third_vb = memnew(VBoxContainer); | ||||
| 	third_vb->set_h_size_flags(SIZE_EXPAND_FILL); | ||||
| 	third_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE); | ||||
| 	third_vb->add_theme_constant_override("separation", 10 * EDSCALE); | ||||
| 	main_hb->add_child(third_vb); | ||||
| 
 | ||||
| 	TabContainer *tc = memnew(TabContainer); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rémi Verschelde
						Rémi Verschelde