mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	[Scene] Add SceneStringNames::font(_size/_color)
				
					
				
			This commit is contained in:
		
							parent
							
								
									b435551682
								
							
						
					
					
						commit
						d519715d94
					
				
					 77 changed files with 453 additions and 446 deletions
				
			
		|  | @ -58,7 +58,7 @@ void TexturePreview::_notification(int p_what) { | |||
| 
 | ||||
| 			if (metadata_label) { | ||||
| 				Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), EditorStringName(EditorFonts)); | ||||
| 				metadata_label->add_theme_font_override("font", metadata_label_font); | ||||
| 				metadata_label->add_theme_font_override(SceneStringName(font), metadata_label_font); | ||||
| 			} | ||||
| 
 | ||||
| 			checkerboard->set_texture(get_editor_theme_icon(SNAME("Checkerboard"))); | ||||
|  | @ -145,10 +145,10 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) { | |||
| 		p_texture->connect_changed(callable_mp(this, &TexturePreview::_update_metadata_label_text)); | ||||
| 
 | ||||
| 		// It's okay that these colors are static since the grid color is static too.
 | ||||
| 		metadata_label->add_theme_color_override("font_color", Color::named("white")); | ||||
| 		metadata_label->add_theme_color_override(SceneStringName(font_color), Color::named("white")); | ||||
| 		metadata_label->add_theme_color_override("font_shadow_color", Color::named("black")); | ||||
| 
 | ||||
| 		metadata_label->add_theme_font_size_override("font_size", 14 * EDSCALE); | ||||
| 		metadata_label->add_theme_font_size_override(SceneStringName(font_size), 14 * EDSCALE); | ||||
| 		metadata_label->add_theme_color_override("font_outline_color", Color::named("black")); | ||||
| 		metadata_label->add_theme_constant_override("outline_size", 8 * EDSCALE); | ||||
| 		metadata_label->set_h_size_flags(Control::SIZE_SHRINK_END); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 A Thousand Ships
						A Thousand Ships