summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/editor_help_search.cpp31
-rw-r--r--editor/editor_help_search.h1
-rw-r--r--editor/editor_node.cpp16
-rw-r--r--editor/editor_themes.cpp4
-rw-r--r--editor/inspector_dock.cpp3
-rw-r--r--scene/resources/mesh.cpp2
6 files changed, 25 insertions, 32 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 1029cfcf0e..44698d93f6 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -37,18 +37,6 @@
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
-void EditorHelpSearch::_update_icons() {
- search_box->set_right_icon(results_tree->get_editor_theme_icon(SNAME("Search")));
- search_box->set_clear_button_enabled(true);
- search_box->add_theme_icon_override("right_icon", results_tree->get_editor_theme_icon(SNAME("Search")));
- case_sensitive_button->set_icon(results_tree->get_editor_theme_icon(SNAME("MatchCase")));
- hierarchy_button->set_icon(results_tree->get_editor_theme_icon(SNAME("ClassList")));
-
- if (is_visible()) {
- _update_results();
- }
-}
-
void EditorHelpSearch::_update_results() {
String term = search_box->get_text();
@@ -114,16 +102,24 @@ void EditorHelpSearch::_notification(int p_what) {
}
} break;
- case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- _update_icons();
- } break;
-
case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &EditorHelpSearch::_confirmed));
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
- _update_icons();
+ const int icon_width = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
+ results_tree->add_theme_constant_override("icon_max_width", icon_width);
+
+ search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
+ search_box->add_theme_icon_override("right_icon", get_editor_theme_icon(SNAME("Search")));
+
+ case_sensitive_button->set_icon(get_editor_theme_icon(SNAME("MatchCase")));
+ hierarchy_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
+
+ if (is_visible()) {
+ _update_results();
+ }
} break;
case NOTIFICATION_PROCESS: {
@@ -204,6 +200,7 @@ EditorHelpSearch::EditorHelpSearch() {
search_box = memnew(LineEdit);
search_box->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ search_box->set_clear_button_enabled(true);
search_box->connect("gui_input", callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
search_box->connect("text_changed", callable_mp(this, &EditorHelpSearch::_search_box_text_changed));
register_text_enter(search_box);
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index e8056ce6ac..30a783a628 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -67,7 +67,6 @@ class EditorHelpSearch : public ConfirmationDialog {
class Runner;
Ref<Runner> search;
- void _update_icons();
void _update_results();
void _search_box_gui_input(const Ref<InputEvent> &p_event);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 3d431ae67e..4f87838014 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2349,21 +2349,15 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
int subr_idx = current_res->get_path().find("::");
if (subr_idx != -1) {
String base_path = current_res->get_path().substr(0, subr_idx);
- if (!base_path.is_resource_file()) {
- if (FileAccess::exists(base_path + ".import")) {
+ if (FileAccess::exists(base_path + ".import")) {
+ if (!base_path.is_resource_file()) {
if (get_edited_scene() && get_edited_scene()->get_scene_file_path() == base_path) {
info_is_warning = true;
}
- editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
- } else {
- if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") {
- editable_info = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it must be made inside the original scene.");
- }
- }
- } else {
- if (FileAccess::exists(base_path + ".import")) {
- editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
}
+ editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
+ } else if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") {
+ editable_info = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it must be made inside the original scene.");
}
} else if (current_res->get_path().is_resource_file()) {
if (FileAccess::exists(current_res->get_path() + ".import")) {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 2a42224c87..227b52472f 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1808,7 +1808,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
if (increase_scrollbar_touch_area) {
theme->set_stylebox("scroll", "HScrollBar", make_line_stylebox(separator_color, 50));
} else {
- theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, -5, 1, -5, 1));
}
theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, 1, 1, 1, 1));
theme->set_stylebox("grabber", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), EditorStringName(EditorIcons)), 6, 6, 6, 6, 1, 1, 1, 1));
@@ -1826,7 +1826,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
if (increase_scrollbar_touch_area) {
theme->set_stylebox("scroll", "VScrollBar", make_line_stylebox(separator_color, 50, 1, 1, true));
} else {
- theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, 1, -5, 1, -5));
}
theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), EditorStringName(EditorIcons)), 5, 5, 5, 5, 1, 1, 1, 1));
theme->set_stylebox("grabber", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), EditorStringName(EditorIcons)), 6, 6, 6, 6, 1, 1, 1, 1));
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 044ac52147..717aaf396f 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -443,6 +443,9 @@ void InspectorDock::_notification(int p_what) {
forward_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
}
+ const int icon_width = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
+ history_menu->get_popup()->add_theme_constant_override("icon_max_width", icon_width);
+
history_menu->set_icon(get_editor_theme_icon(SNAME("History")));
object_menu->set_icon(get_editor_theme_icon(SNAME("Tools")));
search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index a0cdbfa16c..b122189558 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -1019,7 +1019,7 @@ void _fix_array_compatibility(const Vector<uint8_t> &p_src, uint64_t p_old_forma
uint32_t dst_offsets[Mesh::ARRAY_MAX];
RenderingServer::get_singleton()->mesh_surface_make_offsets_from_format(p_new_format & (~RS::ARRAY_FORMAT_INDEX), p_elements, 0, dst_offsets, dst_vertex_stride, dst_normal_tangent_stride, dst_attribute_stride, dst_skin_stride);
- vertex_data.resize(dst_vertex_stride * p_elements);
+ vertex_data.resize((dst_vertex_stride + dst_normal_tangent_stride) * p_elements);
attribute_data.resize(dst_attribute_stride * p_elements);
skin_data.resize(dst_skin_stride * p_elements);