summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/action_map_editor.cpp1
-rw-r--r--editor/debugger/editor_network_profiler.cpp5
-rw-r--r--editor/debugger/editor_profiler.cpp9
-rw-r--r--editor/debugger/editor_visual_profiler.cpp3
-rw-r--r--editor/debugger/script_editor_debugger.cpp2
-rw-r--r--editor/dependency_editor.cpp8
-rw-r--r--editor/editor_asset_installer.cpp44
-rw-r--r--editor/editor_autoload_settings.cpp8
-rw-r--r--editor/editor_help_search.cpp2
-rw-r--r--editor/editor_plugin_settings.cpp5
-rw-r--r--editor/localization_editor.cpp2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp6
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp35
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp6
-rw-r--r--editor/plugins/script_text_editor.cpp5
-rw-r--r--editor/plugins/theme_editor_plugin.cpp3
-rw-r--r--editor/script_create_dialog.cpp72
-rw-r--r--editor/script_create_dialog.h2
18 files changed, 138 insertions, 80 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index fe1401bdf9..7ed603410d 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -1123,6 +1123,7 @@ ActionMapEditor::ActionMapEditor() {
action_tree->set_hide_root(true);
action_tree->set_column_titles_visible(true);
action_tree->set_column_title(0, TTR("Action"));
+ action_tree->set_column_clip_content(0, true);
action_tree->set_column_title(1, TTR("Deadzone"));
action_tree->set_column_expand(1, false);
action_tree->set_column_custom_minimum_width(1, 80 * EDSCALE);
diff --git a/editor/debugger/editor_network_profiler.cpp b/editor/debugger/editor_network_profiler.cpp
index af83baeff8..1c781c4d98 100644
--- a/editor/debugger/editor_network_profiler.cpp
+++ b/editor/debugger/editor_network_profiler.cpp
@@ -178,18 +178,23 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
counters_display->set_column_titles_visible(true);
counters_display->set_column_title(0, TTR("Node"));
counters_display->set_column_expand(0, true);
+ counters_display->set_column_clip_content(0, true);
counters_display->set_column_custom_minimum_width(0, 60 * EDSCALE);
counters_display->set_column_title(1, TTR("Incoming RPC"));
counters_display->set_column_expand(1, false);
+ counters_display->set_column_clip_content(1, true);
counters_display->set_column_custom_minimum_width(1, 120 * EDSCALE);
counters_display->set_column_title(2, TTR("Incoming RSET"));
counters_display->set_column_expand(2, false);
+ counters_display->set_column_clip_content(2, true);
counters_display->set_column_custom_minimum_width(2, 120 * EDSCALE);
counters_display->set_column_title(3, TTR("Outgoing RPC"));
counters_display->set_column_expand(3, false);
+ counters_display->set_column_clip_content(3, true);
counters_display->set_column_custom_minimum_width(3, 120 * EDSCALE);
counters_display->set_column_title(4, TTR("Outgoing RSET"));
counters_display->set_column_expand(4, false);
+ counters_display->set_column_clip_content(4, true);
counters_display->set_column_custom_minimum_width(4, 120 * EDSCALE);
add_child(counters_display);
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index ba84040b0c..5f4d1b6f36 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -631,13 +631,16 @@ EditorProfiler::EditorProfiler() {
variables->set_column_titles_visible(true);
variables->set_column_title(0, TTR("Name"));
variables->set_column_expand(0, true);
- variables->set_column_custom_minimum_width(0, 60 * EDSCALE);
+ variables->set_column_clip_content(0, true);
+ variables->set_column_expand_ratio(0, 60);
variables->set_column_title(1, TTR("Time"));
variables->set_column_expand(1, false);
- variables->set_column_custom_minimum_width(1, 100 * EDSCALE);
+ variables->set_column_clip_content(1, true);
+ variables->set_column_expand_ratio(1, 100);
variables->set_column_title(2, TTR("Calls"));
variables->set_column_expand(2, false);
- variables->set_column_custom_minimum_width(2, 60 * EDSCALE);
+ variables->set_column_clip_content(2, true);
+ variables->set_column_expand_ratio(2, 60);
variables->connect("item_edited", callable_mp(this, &EditorProfiler::_item_edited));
graph = memnew(TextureRect);
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 171d0574e0..a0e8a3bd35 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -773,12 +773,15 @@ EditorVisualProfiler::EditorVisualProfiler() {
variables->set_column_titles_visible(true);
variables->set_column_title(0, TTR("Name"));
variables->set_column_expand(0, true);
+ variables->set_column_clip_content(0, true);
variables->set_column_custom_minimum_width(0, 60);
variables->set_column_title(1, TTR("CPU"));
variables->set_column_expand(1, false);
+ variables->set_column_clip_content(1, true);
variables->set_column_custom_minimum_width(1, 60 * EDSCALE);
variables->set_column_title(2, TTR("GPU"));
variables->set_column_expand(2, false);
+ variables->set_column_clip_content(2, true);
variables->set_column_custom_minimum_width(2, 60 * EDSCALE);
variables->connect("cell_selected", callable_mp(this, &EditorVisualProfiler::_item_selected));
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 0d3fd8c7f6..b877ab030f 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1644,8 +1644,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
error_tree->set_column_expand(0, false);
error_tree->set_column_custom_minimum_width(0, 140);
+ error_tree->set_column_clip_content(0, true);
error_tree->set_column_expand(1, true);
+ error_tree->set_column_clip_content(1, true);
error_tree->set_select_mode(Tree::SELECT_ROW);
error_tree->set_hide_root(true);
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 74a8ad9077..ef571e5c7a 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -226,7 +226,11 @@ DependencyEditor::DependencyEditor() {
tree->set_columns(2);
tree->set_column_titles_visible(true);
tree->set_column_title(0, TTR("Resource"));
+ tree->set_column_clip_content(0, true);
+ tree->set_column_expand_ratio(0, 2);
tree->set_column_title(1, TTR("Path"));
+ tree->set_column_clip_content(1, true);
+ tree->set_column_expand_ratio(1, 1);
tree->set_hide_root(true);
tree->connect("button_pressed", callable_mp(this, &DependencyEditor::_load_pressed));
@@ -769,9 +773,11 @@ OrphanResourcesDialog::OrphanResourcesDialog() {
files = memnew(Tree);
files->set_columns(2);
files->set_column_titles_visible(true);
- files->set_column_custom_minimum_width(1, 100);
+ files->set_column_custom_minimum_width(1, 100 * EDSCALE);
files->set_column_expand(0, true);
+ files->set_column_clip_content(0, true);
files->set_column_expand(1, false);
+ files->set_column_clip_content(1, true);
files->set_column_title(0, TTR("Resource"));
files->set_column_title(1, TTR("Owns"));
files->set_hide_root(true);
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 38f417a8ce..83319ee5a5 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -132,14 +132,54 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
Map<String, Ref<Texture2D>> extension_guess;
{
- extension_guess["png"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["bmp"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["dds"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["exr"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["hdr"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
extension_guess["jpg"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
- extension_guess["atlastex"] = tree->get_theme_icon("AtlasTexture", "EditorIcons");
+ extension_guess["jpeg"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["png"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["svg"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["svgz"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["tga"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+ extension_guess["webp"] = tree->get_theme_icon("ImageTexture", "EditorIcons");
+
+ extension_guess["wav"] = tree->get_theme_icon("AudioStreamSample", "EditorIcons");
+ extension_guess["ogg"] = tree->get_theme_icon("AudioStreamOGGVorbis", "EditorIcons");
+ extension_guess["mp3"] = tree->get_theme_icon("AudioStreamMP3", "EditorIcons");
+
extension_guess["scn"] = tree->get_theme_icon("PackedScene", "EditorIcons");
extension_guess["tscn"] = tree->get_theme_icon("PackedScene", "EditorIcons");
+ extension_guess["escn"] = tree->get_theme_icon("PackedScene", "EditorIcons");
+ extension_guess["dae"] = tree->get_theme_icon("PackedScene", "EditorIcons");
+ extension_guess["gltf"] = tree->get_theme_icon("PackedScene", "EditorIcons");
+ extension_guess["glb"] = tree->get_theme_icon("PackedScene", "EditorIcons");
+
extension_guess["gdshader"] = tree->get_theme_icon("Shader", "EditorIcons");
extension_guess["gd"] = tree->get_theme_icon("GDScript", "EditorIcons");
+ if (Engine::get_singleton()->has_singleton("GodotSharp")) {
+ extension_guess["cs"] = tree->get_theme_icon("CSharpScript", "EditorIcons");
+ } else {
+ // Mark C# support as unavailable.
+ extension_guess["cs"] = tree->get_theme_icon("ImportFail", "EditorIcons");
+ }
extension_guess["vs"] = tree->get_theme_icon("VisualScript", "EditorIcons");
+
+ extension_guess["res"] = tree->get_theme_icon("Resource", "EditorIcons");
+ extension_guess["tres"] = tree->get_theme_icon("Resource", "EditorIcons");
+ extension_guess["atlastex"] = tree->get_theme_icon("AtlasTexture", "EditorIcons");
+ // By default, OBJ files are imported as Mesh resources rather than PackedScenes.
+ extension_guess["obj"] = tree->get_theme_icon("Mesh", "EditorIcons");
+
+ extension_guess["txt"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["md"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["rst"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["json"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["yml"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["yaml"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["toml"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["cfg"] = tree->get_theme_icon("TextFile", "EditorIcons");
+ extension_guess["ini"] = tree->get_theme_icon("TextFile", "EditorIcons");
}
Ref<Texture2D> generic_extension = tree->get_theme_icon("Object", "EditorIcons");
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 306a88047a..12ae55fbc1 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -882,19 +882,17 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_title(0, TTR("Name"));
tree->set_column_expand(0, true);
- tree->set_column_custom_minimum_width(0, 100 * EDSCALE);
+ tree->set_column_expand_ratio(0, 1);
tree->set_column_title(1, TTR("Path"));
tree->set_column_expand(1, true);
- tree->set_column_custom_minimum_width(1, 100 * EDSCALE);
+ tree->set_column_clip_content(1, true);
+ tree->set_column_expand_ratio(1, 2);
tree->set_column_title(2, TTR("Global Variable"));
tree->set_column_expand(2, false);
- // Reserve enough space for translations of "Global Variable" which may be longer.
- tree->set_column_custom_minimum_width(2, 150 * EDSCALE);
tree->set_column_expand(3, false);
- tree->set_column_custom_minimum_width(3, 120 * EDSCALE);
tree->connect("cell_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_selected));
tree->connect("item_edited", callable_mp(this, &EditorAutoloadSettings::_autoload_edited));
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 57ddc64e95..a9bbb92079 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -237,9 +237,11 @@ EditorHelpSearch::EditorHelpSearch() {
results_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
results_tree->set_columns(2);
results_tree->set_column_title(0, TTR("Name"));
+ results_tree->set_column_clip_content(0, true);
results_tree->set_column_title(1, TTR("Member Type"));
results_tree->set_column_expand(1, false);
results_tree->set_column_custom_minimum_width(1, 150 * EDSCALE);
+ results_tree->set_column_clip_content(1, true);
results_tree->set_custom_minimum_size(Size2(0, 100) * EDSCALE);
results_tree->set_hide_root(true);
results_tree->set_select_mode(Tree::SELECT_ROW);
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 62fbad7bcf..b4e5a58c21 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -212,10 +212,15 @@ EditorPluginSettings::EditorPluginSettings() {
plugin_list->set_column_title(3, TTR("Status:"));
plugin_list->set_column_title(4, TTR("Edit:"));
plugin_list->set_column_expand(0, true);
+ plugin_list->set_column_clip_content(0, true);
plugin_list->set_column_expand(1, false);
+ plugin_list->set_column_clip_content(1, true);
plugin_list->set_column_expand(2, false);
+ plugin_list->set_column_clip_content(2, true);
plugin_list->set_column_expand(3, false);
+ plugin_list->set_column_clip_content(3, true);
plugin_list->set_column_expand(4, false);
+ plugin_list->set_column_clip_content(4, true);
plugin_list->set_column_custom_minimum_width(1, 100 * EDSCALE);
plugin_list->set_column_custom_minimum_width(2, 250 * EDSCALE);
plugin_list->set_column_custom_minimum_width(3, 80 * EDSCALE);
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 91a15f1131..208d4437d3 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -728,7 +728,9 @@ LocalizationEditor::LocalizationEditor() {
translation_remap_options->set_column_title(1, TTR("Locale"));
translation_remap_options->set_column_titles_visible(true);
translation_remap_options->set_column_expand(0, true);
+ translation_remap_options->set_column_clip_content(0, true);
translation_remap_options->set_column_expand(1, false);
+ translation_remap_options->set_column_clip_content(1, true);
translation_remap_options->set_column_custom_minimum_width(1, 200);
translation_remap_options->connect("item_edited", callable_mp(this, &LocalizationEditor::_translation_res_option_changed));
translation_remap_options->connect("button_pressed", callable_mp(this, &LocalizationEditor::_translation_res_option_delete));
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 48d7cfdee2..2b92943f7e 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -569,8 +569,10 @@ void AnimationPlayerEditor::_animation_blend() {
blend_editor.dialog->popup_centered(Size2(400, 400) * EDSCALE);
blend_editor.tree->set_hide_root(true);
- blend_editor.tree->set_column_custom_minimum_width(0, 10);
- blend_editor.tree->set_column_custom_minimum_width(1, 3);
+ blend_editor.tree->set_column_expand_ratio(0, 10);
+ blend_editor.tree->set_column_clip_content(0, true);
+ blend_editor.tree->set_column_expand_ratio(1, 3);
+ blend_editor.tree->set_column_clip_content(1, true);
List<StringName> anims;
player->get_animation_list(&anims);
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 228fe1649b..78390f0fdf 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2505,24 +2505,20 @@ void Node3DEditorViewport::_notification(int p_what) {
if (show_info) {
String text;
- text += "X: " + rtos(current_camera->get_position().x).pad_decimals(1) + "\n";
- text += "Y: " + rtos(current_camera->get_position().y).pad_decimals(1) + "\n";
- text += "Z: " + rtos(current_camera->get_position().z).pad_decimals(1) + "\n";
- text += TTR("Pitch") + ": " + itos(Math::round(Math::rad2deg(current_camera->get_rotation().x))) + "\n";
- text += TTR("Yaw") + ": " + itos(Math::round(Math::rad2deg(current_camera->get_rotation().y))) + "\n\n";
-
- text += TTR("Size") +
- vformat(
- ": %dx%d (%.1fMP)\n",
- viewport->get_size().x,
- viewport->get_size().y,
- viewport->get_size().x * viewport->get_size().y * 0.000'001);
- text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
- text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n";
- text += TTR("Shader Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_SHADER_CHANGES_IN_FRAME)) + "\n";
- text += TTR("Surface Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_SURFACE_CHANGES_IN_FRAME)) + "\n";
- text += TTR("Draw Calls") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_DRAW_CALLS_IN_FRAME)) + "\n";
- text += TTR("Vertices") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_VERTICES_IN_FRAME));
+ text += vformat(TTR("X: %s\n"), rtos(current_camera->get_position().x).pad_decimals(1));
+ text += vformat(TTR("Y: %s\n"), rtos(current_camera->get_position().y).pad_decimals(1));
+ text += vformat(TTR("Z: %s\n"), rtos(current_camera->get_position().z).pad_decimals(1));
+ text += "\n";
+ text += vformat(
+ TTR("Size: %dx%d (%.1fMP)\n"),
+ viewport->get_size().x,
+ viewport->get_size().y,
+ viewport->get_size().x * viewport->get_size().y * 0.000001);
+
+ text += "\n";
+ text += vformat(TTR("Objects: %d\n"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_OBJECTS_IN_FRAME));
+ text += vformat(TTR("Primitives: %d\n"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_PRIMITIVES_IN_FRAME));
+ text += vformat(TTR("Draw Calls: %d"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_DRAW_CALLS_IN_FRAME));
info_label->set_text(text);
}
@@ -3254,14 +3250,12 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
if (!preview) {
preview_camera->hide();
}
- view_menu->set_disabled(false);
surface->update();
} else {
previewing = preview;
previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace
- view_menu->set_disabled(true);
surface->update();
}
}
@@ -3508,7 +3502,6 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
previewing = Object::cast_to<Camera3D>(pv);
previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace
- view_menu->set_disabled(true);
surface->update();
preview_camera->set_pressed(true);
preview_camera->show();
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index a7c11f8521..488aa8c861 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -367,8 +367,10 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
tree = memnew(Tree);
tree->connect("button_pressed", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
tree->set_columns(2);
- tree->set_column_custom_minimum_width(0, 2);
- tree->set_column_custom_minimum_width(1, 3);
+ tree->set_column_expand_ratio(0, 2);
+ tree->set_column_clip_content(0, true);
+ tree->set_column_expand_ratio(1, 3);
+ tree->set_column_clip_content(1, true);
tree->set_column_expand(0, true);
tree->set_column_expand(1, true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index bec2814462..cc0fbcc634 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1444,6 +1444,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) {
+ const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
Array files = d["files"];
String text_to_drop;
@@ -1454,9 +1455,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (preload) {
- text_to_drop += "preload(\"" + String(files[i]).c_escape() + "\")";
+ text_to_drop += "preload(" + String(files[i]).c_escape().quote(quote_style) + ")";
} else {
- text_to_drop += "\"" + String(files[i]).c_escape() + "\"";
+ text_to_drop += String(files[i]).c_escape().quote(quote_style);
}
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 99d7267eac..be1aeb309f 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -930,11 +930,14 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_items_tree->set_column_title(IMPORT_ITEM, TTR("Import"));
import_items_tree->set_column_title(IMPORT_ITEM_DATA, TTR("With Data"));
import_items_tree->set_column_expand(0, true);
+ import_items_tree->set_column_clip_content(0, true);
import_items_tree->set_column_expand(IMPORT_ITEM, false);
import_items_tree->set_column_expand(IMPORT_ITEM_DATA, false);
import_items_tree->set_column_custom_minimum_width(0, 160 * EDSCALE);
import_items_tree->set_column_custom_minimum_width(IMPORT_ITEM, 80 * EDSCALE);
import_items_tree->set_column_custom_minimum_width(IMPORT_ITEM_DATA, 80 * EDSCALE);
+ import_items_tree->set_column_clip_content(1, true);
+ import_items_tree->set_column_clip_content(2, true);
ScrollContainer *import_bulk_sc = memnew(ScrollContainer);
import_bulk_sc->set_custom_minimum_size(Size2(260.0, 0.0) * EDSCALE);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index fdbde8dc5c..97edf84488 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -40,38 +40,35 @@
#include "editor/editor_scale.h"
#include "editor_file_system.h"
-void ScriptCreateDialog::_theme_changed() {
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- String lang = ScriptServer::get_language(i)->get_type();
- Ref<Texture2D> lang_icon = gc->get_theme_icon(lang, "EditorIcons");
- if (lang_icon.is_valid()) {
- language_menu->set_item_icon(i, lang_icon);
- }
- }
-
- String last_lang = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", "");
- if (!last_lang.is_empty()) {
- for (int i = 0; i < language_menu->get_item_count(); i++) {
- if (language_menu->get_item_text(i) == last_lang) {
- language_menu->select(i);
- current_language = i;
- break;
+void ScriptCreateDialog::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ String lang = ScriptServer::get_language(i)->get_type();
+ Ref<Texture2D> lang_icon = get_theme_icon(lang, "EditorIcons");
+ if (lang_icon.is_valid()) {
+ language_menu->set_item_icon(i, lang_icon);
+ }
}
- }
- } else {
- language_menu->select(default_language);
- }
- path_button->set_icon(gc->get_theme_icon("Folder", "EditorIcons"));
- parent_browse_button->set_icon(gc->get_theme_icon("Folder", "EditorIcons"));
- parent_search_button->set_icon(gc->get_theme_icon("ClassList", "EditorIcons"));
- status_panel->add_theme_style_override("panel", gc->get_theme_stylebox("bg", "Tree"));
-}
+ String last_lang = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", "");
+ if (!last_lang.is_empty()) {
+ for (int i = 0; i < language_menu->get_item_count(); i++) {
+ if (language_menu->get_item_text(i) == last_lang) {
+ language_menu->select(i);
+ current_language = i;
+ break;
+ }
+ }
+ } else {
+ language_menu->select(default_language);
+ }
-void ScriptCreateDialog::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
- _theme_changed();
+ path_button->set_icon(get_theme_icon("Folder", "EditorIcons"));
+ parent_browse_button->set_icon(get_theme_icon("Folder", "EditorIcons"));
+ parent_search_button->set_icon(get_theme_icon("ClassList", "EditorIcons"));
+ status_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
} break;
}
}
@@ -451,7 +448,7 @@ void ScriptCreateDialog::_lang_changed(int l) {
override_info += ", ";
}
}
- template_menu->set_item_icon(extended.id, gc->get_theme_icon("Override", "EditorIcons"));
+ template_menu->set_item_icon(extended.id, get_theme_icon("Override", "EditorIcons"));
template_menu->get_popup()->set_item_tooltip(extended.id, override_info.as_string());
}
// Reselect last selected template
@@ -609,18 +606,18 @@ void ScriptCreateDialog::_path_submitted(const String &p_path) {
void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
error_label->set_text("- " + p_msg);
if (valid) {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ error_label->add_theme_color_override("font_color", get_theme_color("success_color", "Editor"));
} else {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
}
}
void ScriptCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
path_error_label->set_text("- " + p_msg);
if (valid) {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", get_theme_color("success_color", "Editor"));
} else {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
}
}
@@ -748,15 +745,11 @@ void ScriptCreateDialog::_bind_methods() {
}
ScriptCreateDialog::ScriptCreateDialog() {
- /* DIALOG */
-
/* Main Controls */
- gc = memnew(GridContainer);
+ GridContainer *gc = memnew(GridContainer);
gc->set_columns(2);
- gc->connect("theme_changed", callable_mp(this, &ScriptCreateDialog::_theme_changed));
-
/* Error Messages Field */
VBoxContainer *vb = memnew(VBoxContainer);
@@ -832,7 +825,6 @@ ScriptCreateDialog::ScriptCreateDialog() {
parent_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb->add_child(parent_name);
parent_search_button = memnew(Button);
- parent_search_button->set_flat(true);
parent_search_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_class_in_tree));
hb->add_child(parent_search_button);
parent_browse_button = memnew(Button);
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index a020be0478..7c2ef1e150 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -45,7 +45,6 @@ class CreateDialog;
class ScriptCreateDialog : public ConfirmationDialog {
GDCLASS(ScriptCreateDialog, ConfirmationDialog);
- GridContainer *gc;
LineEdit *class_name;
Label *error_label;
Label *path_error_label;
@@ -127,7 +126,6 @@ class ScriptCreateDialog : public ConfirmationDialog {
void _update_dialog();
protected:
- void _theme_changed();
void _notification(int p_what);
static void _bind_methods();