1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[macOS] Prefer .app bundle icon over the default one.

This commit is contained in:
bruvzg
2021-05-13 09:25:40 +03:00
parent fcfce4be67
commit 3b0c071ce2
5 changed files with 30 additions and 9 deletions

View File

@@ -1365,8 +1365,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
#ifdef TOOLS_ENABLED
Ref<Image> icon = memnew(Image(app_icon_png));
OS::get_singleton()->set_icon(icon);
if (OS::get_singleton()->get_bundle_icon_path().empty()) {
Ref<Image> icon = memnew(Image(app_icon_png));
OS::get_singleton()->set_icon(icon);
}
#endif
}
@@ -1989,7 +1991,7 @@ bool Main::start() {
#endif
}
if (!hasicon) {
if (!hasicon && OS::get_singleton()->get_bundle_icon_path().empty()) {
Ref<Image> icon = memnew(Image(app_icon_png));
OS::get_singleton()->set_icon(icon);
}