Jelajahi Sumber

Allow using SVG images as project icon

Since exporters will save their own icon, the target platforms
don't have to support SVG to display the icon correctly.

This closes #23068.

(cherry picked from commit 0f9432f0609d1e6b64a4038047777c3c108bc047)
Hugo Locurcio 4 tahun lalu
induk
melakukan
b7a3df473d
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      main/main.cpp

+ 3 - 1
main/main.cpp

@@ -1368,7 +1368,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
 	MAIN_PRINT("Main: END");
 
 	GLOBAL_DEF("application/config/icon", String());
-	ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon", PropertyInfo(Variant::STRING, "application/config/icon", PROPERTY_HINT_FILE, "*.png,*.webp"));
+	ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
+			PropertyInfo(Variant::STRING, "application/config/icon",
+					PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"));
 
 	GLOBAL_DEF("application/config/macos_native_icon", String());
 	ProjectSettings::get_singleton()->set_custom_property_info("application/config/macos_native_icon", PropertyInfo(Variant::STRING, "application/config/macos_native_icon", PROPERTY_HINT_FILE, "*.icns"));