summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/dependency_editor.cpp26
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_settings.cpp4
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp2
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp11
-rw-r--r--editor/plugins/editor_preview_plugins.cpp9
6 files changed, 23 insertions, 31 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 953d787322..c4a17d5402 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -504,25 +504,25 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
void DependencyRemoveDialog::ok_pressed() {
+ for (int i = 0; i < files_to_delete.size(); ++i) {
+ if (ResourceCache::has(files_to_delete[i])) {
+ Resource *res = ResourceCache::get(files_to_delete[i]);
+ res->set_path("");
+ }
+ String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
+ print_line("Moving to trash: " + path);
+ Error err = OS::get_singleton()->move_to_trash(path);
+ if (err != OK) {
+ EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n");
+ }
+ }
+
if (dirs_to_delete.size() == 0) {
//If we only deleted files we should only need to tell the file system about the files we touched.
for (int i = 0; i < files_to_delete.size(); ++i)
EditorFileSystem::get_singleton()->update_file(files_to_delete[i]);
} else {
- for (int i = 0; i < files_to_delete.size(); ++i) {
- if (ResourceCache::has(files_to_delete[i])) {
- Resource *res = ResourceCache::get(files_to_delete[i]);
- res->set_path("");
- }
- String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
- print_line("Moving to trash: " + path);
- Error err = OS::get_singleton()->move_to_trash(path);
- if (err != OK) {
- EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n");
- }
- }
-
for (int i = 0; i < dirs_to_delete.size(); ++i) {
String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/");
print_line("Moving to trash: " + path);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index fd5a6dffc9..3f0a09cfd9 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -483,7 +483,7 @@ void EditorNode::_fs_changed() {
// come during the export
export_defer.preset = "";
Error err = OK;
- if (!preset->is_runnable() && (export_defer.path.ends_with(".pck") || export_defer.path.ends_with(".zip"))) {
+ if (export_defer.path.ends_with(".pck") || export_defer.path.ends_with(".zip")) {
if (export_defer.path.ends_with(".zip")) {
err = platform->export_zip(preset, export_defer.debug, export_defer.path);
} else if (export_defer.path.ends_with(".pck")) {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index b741c432ce..7aca92e3ab 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -298,8 +298,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/code_font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/code_font_hinting", PROPERTY_HINT_ENUM, "None,Light,Normal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/main_font", "");
hints["interface/editor/main_font"] = PropertyInfo(Variant::STRING, "interface/editor/main_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- _initial_set("interface/editor/main__bold_font", "");
- hints["interface/editor/main_font_bold"] = PropertyInfo(Variant::STRING, "interface/editor/main_bold_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ _initial_set("interface/editor/main_font_bold", "");
+ hints["interface/editor/main_font_bold"] = PropertyInfo(Variant::STRING, "interface/editor/main_font_bold", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/code_font", "");
hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index af79f9946a..f4be6e8d59 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -1163,7 +1163,7 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
continue;
}
- if (mimetype.findn("jpg") != -1) {
+ if (mimetype.findn("jpeg") != -1) {
//is a jpg
Ref<Image> img = Image::_jpg_mem_loader_func(data_ptr, data_size);
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 05833704d1..eef72a8b3e 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -65,7 +65,7 @@ void EditorAssetLibraryItem::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- icon->set_normal_texture(get_icon("GodotAssetDefault", "EditorIcons"));
+ icon->set_normal_texture(get_icon("DefaultProjectIcon", "EditorIcons"));
category->add_color_override("font_color", Color(0.5, 0.5, 0.5));
author->add_color_override("font_color", Color(0.5, 0.5, 0.5));
}
@@ -110,6 +110,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
add_child(hb);
icon = memnew(TextureButton);
+ icon->set_custom_minimum_size(Size2(64, 64));
icon->set_default_cursor_shape(CURSOR_POINTING_HAND);
icon->connect("pressed", this, "_asset_clicked");
@@ -383,7 +384,7 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse
icon->set_texture(p_preview);
asset_id = p_asset_id;
if (!p_preview.is_valid())
- icon->set_texture(get_icon("GodotAssetDefault", "EditorIcons"));
+ icon->set_texture(get_icon("DefaultProjectIcon", "EditorIcons"));
host = p_download_url;
sha256 = p_sha256_hash;
asset_installer->connect("confirmed", this, "_close");
@@ -694,7 +695,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
switch (image_queue[p_queue_id].image_type) {
case IMAGE_QUEUE_ICON:
- image->resize(80 * EDSCALE, 80 * EDSCALE, Image::INTERPOLATE_CUBIC);
+ image->resize(64 * EDSCALE, 64 * EDSCALE, Image::INTERPOLATE_CUBIC);
break;
case IMAGE_QUEUE_THUMBNAIL: {
@@ -724,7 +725,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
}
if (!image_set && final) {
- obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("ErrorSign", "EditorIcons"));
+ obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons"));
}
}
}
@@ -767,7 +768,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
WARN_PRINTS("Error getting PNG file from URL: " + image_queue[p_queue_id].image_url);
Object *obj = ObjectDB::get_instance(image_queue[p_queue_id].target);
if (obj) {
- obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("ErrorSign", "EditorIcons"));
+ obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons"));
}
}
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 8542296bde..d76c515c1f 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -467,15 +467,6 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
- if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
- Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
-
- bg_color = tm->get_color("text_editor/highlighting/background_color", "Editor");
- keyword_color = tm->get_color("text_editor/highlighting/keyword_color", "Editor");
- text_color = tm->get_color("text_editor/highlighting/text_color", "Editor");
- symbol_color = tm->get_color("text_editor/highlighting/symbol_color", "Editor");
- }
-
img->lock();
if (bg_color.a == 0)