summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--drivers/vulkan/rendering_device_driver_vulkan.cpp6
-rw-r--r--editor/action_map_editor.cpp6
-rw-r--r--editor/action_map_editor.h3
-rw-r--r--editor/editor_settings_dialog.cpp13
-rw-r--r--editor/editor_settings_dialog.h14
-rw-r--r--editor/export/project_export.cpp24
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
-rw-r--r--scene/gui/button.h3
-rw-r--r--scene/gui/check_box.cpp6
-rw-r--r--scene/gui/check_button.cpp6
11 files changed, 57 insertions, 29 deletions
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 30df4fd10d..d2af6179d9 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -122,7 +122,7 @@
The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="icon_max_width" data_type="constant" type="int" default="0">
- The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio.
+ The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio. If the button has additional icons (e.g. [CheckBox]), they will also be limited.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp
index 131e0e4a8a..896fc6ff91 100644
--- a/drivers/vulkan/rendering_device_driver_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp
@@ -3816,11 +3816,11 @@ bool RenderingDeviceDriverVulkan::pipeline_cache_create(const Vector<uint8_t> &p
if (p_data.is_empty()) {
// No pre-existing cache, just create it.
} else if (p_data.size() <= (int)sizeof(PipelineCacheHeader)) {
- WARN_PRINT("Invalid/corrupt pipelines cache.");
+ print_verbose("Invalid/corrupt Vulkan pipelines cache. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay.");
} else {
const PipelineCacheHeader *loaded_header = reinterpret_cast<const PipelineCacheHeader *>(p_data.ptr());
if (loaded_header->magic != 868 + VK_PIPELINE_CACHE_HEADER_VERSION_ONE) {
- WARN_PRINT("Invalid pipelines cache magic number.");
+ print_verbose("Invalid Vulkan pipelines cache magic number. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay.");
} else {
const uint8_t *loaded_buffer_start = p_data.ptr() + sizeof(PipelineCacheHeader);
uint32_t loaded_buffer_size = p_data.size() - sizeof(PipelineCacheHeader);
@@ -3832,7 +3832,7 @@ bool RenderingDeviceDriverVulkan::pipeline_cache_create(const Vector<uint8_t> &p
loaded_header->driver_version != current_header->driver_version ||
memcmp(loaded_header->uuid, current_header->uuid, VK_UUID_SIZE) != 0 ||
loaded_header->driver_abi != current_header->driver_abi) {
- WARN_PRINT("Invalid pipelines cache header.");
+ print_verbose("Invalid Vulkan pipelines cache header. This may be due to an engine change, GPU change or graphics driver version change. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay.");
} else {
pipelines_cache.current_size = loaded_buffer_size;
pipelines_cache.buffer = p_data;
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 6ff0520ab6..3023c5907a 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -505,6 +505,9 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
event_item->set_button_color(2, 1, Color(1, 1, 1, 0.75));
}
}
+
+ // Update UI.
+ clear_all_search->set_disabled(action_list_search->get_text().is_empty() && action_list_search_by_event->get_event().is_null());
}
void ActionMapEditor::show_message(const String &p_message) {
@@ -550,8 +553,9 @@ ActionMapEditor::ActionMapEditor() {
action_list_search_by_event->connect(SceneStringName(focus_exited), callable_mp(this, &ActionMapEditor::_on_filter_unfocused));
top_hbox->add_child(action_list_search_by_event);
- Button *clear_all_search = memnew(Button);
+ clear_all_search = memnew(Button);
clear_all_search->set_text(TTR("Clear All"));
+ clear_all_search->set_tooltip_text(TTR("Clear all search filters."));
clear_all_search->connect(SceneStringName(pressed), callable_mp(action_list_search_by_event, &EventListenerLineEdit::clear_event));
clear_all_search->connect(SceneStringName(pressed), callable_mp(action_list_search, &LineEdit::clear));
top_hbox->add_child(clear_all_search);
diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h
index 2b329f2fca..017296bfaa 100644
--- a/editor/action_map_editor.h
+++ b/editor/action_map_editor.h
@@ -52,7 +52,7 @@ public:
bool has_initial = false;
Dictionary action_initial;
- Ref<Texture2D> icon = Ref<Texture2D>();
+ Ref<Texture2D> icon;
bool editable = true;
};
@@ -85,6 +85,7 @@ private:
CheckButton *show_builtin_actions_checkbutton = nullptr;
LineEdit *action_list_search = nullptr;
EventListenerLineEdit *action_list_search_by_event = nullptr;
+ Button *clear_all_search = nullptr;
HBoxContainer *add_hbox = nullptr;
LineEdit *add_edit = nullptr;
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index 2c6c13401f..b1f3875175 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -30,14 +30,13 @@
#include "editor_settings_dialog.h"
-#include "core/config/project_settings.h"
#include "core/input/input_map.h"
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
-#include "editor/editor_file_system.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_property_name_processor.h"
+#include "editor/editor_sectioned_inspector.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
@@ -45,7 +44,9 @@
#include "editor/input_event_configuration_dialog.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
-#include "scene/gui/margin_container.h"
+#include "scene/gui/panel_container.h"
+#include "scene/gui/tab_container.h"
+#include "scene/gui/texture_rect.h"
void EditorSettingsDialog::ok_pressed() {
if (!EditorSettings::get_singleton()) {
@@ -499,6 +500,9 @@ void EditorSettingsDialog::_update_shortcuts() {
memdelete(section);
}
}
+
+ // Update UI.
+ clear_all_search->set_disabled(shortcut_search_box->get_text().is_empty() && shortcut_search_by_event->get_event().is_null());
}
void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column, int p_idx, MouseButton p_button) {
@@ -782,8 +786,9 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcut_search_by_event->connect(SceneStringName(focus_exited), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
top_hbox->add_child(shortcut_search_by_event);
- Button *clear_all_search = memnew(Button);
+ clear_all_search = memnew(Button);
clear_all_search->set_text(TTR("Clear All"));
+ clear_all_search->set_tooltip_text(TTR("Clear all search filters."));
clear_all_search->connect(SceneStringName(pressed), callable_mp(shortcut_search_box, &LineEdit::clear));
clear_all_search->connect(SceneStringName(pressed), callable_mp(shortcut_search_by_event, &EventListenerLineEdit::clear_event));
top_hbox->add_child(clear_all_search);
diff --git a/editor/editor_settings_dialog.h b/editor/editor_settings_dialog.h
index fdfc0a43ec..cab8fe9da1 100644
--- a/editor/editor_settings_dialog.h
+++ b/editor/editor_settings_dialog.h
@@ -32,13 +32,14 @@
#define EDITOR_SETTINGS_DIALOG_H
#include "editor/action_map_editor.h"
-#include "editor/editor_inspector.h"
-#include "editor/editor_sectioned_inspector.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/panel_container.h"
-#include "scene/gui/rich_text_label.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/texture_rect.h"
+
+class PanelContainer;
+class SectionedInspector;
+class TabContainer;
+class TextureRect;
+class Tree;
+class TreeItem;
class EditorSettingsDialog : public AcceptDialog {
GDCLASS(EditorSettingsDialog, AcceptDialog);
@@ -53,6 +54,7 @@ class EditorSettingsDialog : public AcceptDialog {
LineEdit *shortcut_search_box = nullptr;
EventListenerLineEdit *shortcut_search_by_event = nullptr;
SectionedInspector *inspector = nullptr;
+ Button *clear_all_search = nullptr;
// Shortcuts
enum ShortcutButton {
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index c6a671b7f9..dd283ebfd6 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -131,7 +131,7 @@ void ProjectExportDialog::popup_export() {
if (saved_size != Rect2()) {
popup(saved_size);
} else {
- popup_centered_clamped(Size2(900, 700) * EDSCALE, 0.8);
+ popup_centered_clamped(Size2(900, 500) * EDSCALE, 0.7);
}
}
@@ -1311,9 +1311,15 @@ ProjectExportDialog::ProjectExportDialog() {
// Resources export parameters.
+ ScrollContainer *resources_scroll_container = memnew(ScrollContainer);
+ resources_scroll_container->set_name(TTR("Resources"));
+ resources_scroll_container->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+ sections->add_child(resources_scroll_container);
+
VBoxContainer *resources_vb = memnew(VBoxContainer);
- sections->add_child(resources_vb);
- resources_vb->set_name(TTR("Resources"));
+ resources_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ resources_vb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ resources_scroll_container->add_child(resources_vb);
export_filter = memnew(OptionButton);
export_filter->add_item(TTR("Export all resources in the project"));
@@ -1332,6 +1338,7 @@ ProjectExportDialog::ProjectExportDialog() {
resources_vb->add_child(include_margin);
include_files = memnew(Tree);
+ include_files->set_custom_minimum_size(Size2(1, 75 * EDSCALE));
include_margin->add_child(include_files);
include_files->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
include_files->connect("item_edited", callable_mp(this, &ProjectExportDialog::_tree_changed));
@@ -1384,18 +1391,25 @@ ProjectExportDialog::ProjectExportDialog() {
VBoxContainer *feature_vb = memnew(VBoxContainer);
feature_vb->set_name(TTR("Features"));
+ feature_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
custom_features = memnew(LineEdit);
custom_features->connect("text_changed", callable_mp(this, &ProjectExportDialog::_custom_features_changed));
feature_vb->add_margin_child(TTR("Custom (comma-separated):"), custom_features);
custom_feature_display = memnew(RichTextLabel);
+ custom_feature_display->set_custom_minimum_size(Size2(1, 75 * EDSCALE));
custom_feature_display->set_v_size_flags(Control::SIZE_EXPAND_FILL);
feature_vb->add_margin_child(TTR("Feature List:"), custom_feature_display, true);
sections->add_child(feature_vb);
// Encryption export parameters.
+ ScrollContainer *sec_scroll_container = memnew(ScrollContainer);
+ sec_scroll_container->set_name(TTR("Encryption"));
+ sec_scroll_container->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+
VBoxContainer *sec_vb = memnew(VBoxContainer);
- sec_vb->set_name(TTR("Encryption"));
+ sec_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ sec_scroll_container->add_child(sec_vb);
enc_pck = memnew(CheckButton);
enc_pck->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_pck_changed));
@@ -1426,7 +1440,7 @@ ProjectExportDialog::ProjectExportDialog() {
script_key_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key);
sec_vb->add_child(script_key_error);
- sections->add_child(sec_vb);
+ sections->add_child(sec_scroll_container);
Label *sec_info = memnew(Label);
sec_info->set_text(TTR("Note: Encryption key needs to be stored in the binary,\nyou need to build the export templates from source."));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index eb6282ca0c..63eecd357d 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -4122,6 +4122,9 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_previous", TTR("History Previous"), KeyModifierMask::ALT | Key::LEFT), WINDOW_PREV);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_next", TTR("History Next"), KeyModifierMask::ALT | Key::RIGHT), WINDOW_NEXT);
+ ED_SHORTCUT_OVERRIDE("script_editor/history_previous", "macos", KeyModifierMask::ALT | KeyModifierMask::META | Key::LEFT);
+ ED_SHORTCUT_OVERRIDE("script_editor/history_next", "macos", KeyModifierMask::ALT | KeyModifierMask::META | Key::RIGHT);
+
file_menu->get_popup()->add_separator();
theme_submenu = memnew(PopupMenu);
diff --git a/scene/gui/button.h b/scene/gui/button.h
index d2f80893e0..eefb690913 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -100,8 +100,6 @@ private:
int icon_max_width = 0;
} theme_cache;
- Size2 _fit_icon_size(const Size2 &p_size) const;
-
void _shape(Ref<TextParagraph> p_paragraph = Ref<TextParagraph>(), String p_text = "");
void _texture_changed();
@@ -111,6 +109,7 @@ protected:
void _set_internal_margin(Side p_side, float p_value);
virtual void _queue_update_size_cache();
+ Size2 _fit_icon_size(const Size2 &p_size) const;
Ref<StyleBox> _get_current_stylebox() const;
Size2 _get_largest_stylebox_size() const;
void _notification(int p_what);
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index 0dcd1d4ac4..99937aaf41 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -59,7 +59,7 @@ Size2 CheckBox::get_icon_size() const {
if (!theme_cache.radio_unchecked_disabled.is_null()) {
tex_size = tex_size.max(theme_cache.radio_unchecked_disabled->get_size());
}
- return tex_size;
+ return _fit_icon_size(tex_size);
}
Size2 CheckBox::get_minimum_size() const {
@@ -127,9 +127,9 @@ void CheckBox::_notification(int p_what) {
ofs.y = int((get_size().height - get_icon_size().height) / 2) + theme_cache.check_v_offset;
if (is_pressed()) {
- on_tex->draw(ci, ofs);
+ on_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(on_tex->get_size())));
} else {
- off_tex->draw(ci, ofs);
+ off_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(off_tex->get_size())));
}
} break;
}
diff --git a/scene/gui/check_button.cpp b/scene/gui/check_button.cpp
index fe449fbfc3..29b9504776 100644
--- a/scene/gui/check_button.cpp
+++ b/scene/gui/check_button.cpp
@@ -63,7 +63,7 @@ Size2 CheckButton::get_icon_size() const {
tex_size = tex_size.max(off_tex->get_size());
}
- return tex_size;
+ return _fit_icon_size(tex_size);
}
Size2 CheckButton::get_minimum_size() const {
@@ -134,9 +134,9 @@ void CheckButton::_notification(int p_what) {
ofs.y = (get_size().height - tex_size.height) / 2 + theme_cache.check_v_offset;
if (is_pressed()) {
- on_tex->draw(ci, ofs);
+ on_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(on_tex->get_size())));
} else {
- off_tex->draw(ci, ofs);
+ off_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(off_tex->get_size())));
}
} break;
}