summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-06-08 13:00:53 -0300
committerGitHub <noreply@github.com>2018-06-08 13:00:53 -0300
commita8dd5750e2accc987f7bcaf35946ac528f465f4f (patch)
tree007ea997a4c213f5e9df2d67e358e1778ccb7fc1 /editor/plugins
parent6f328420c3f62726c2264d5d3725a48d57f218e1 (diff)
parent7a3882723cf12f8d547e3eb18ed3b375c43fcd03 (diff)
Merge pull request #19334 from guilhermefelipecgs/fix_popup
Fixes popup_centered_* methods, dialogs with wrong sizes and visual script editor
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp1
-rw-r--r--editor/plugins/script_editor_plugin.cpp25
-rw-r--r--editor/plugins/script_editor_plugin.h4
3 files changed, 18 insertions, 12 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index d595d4dd98..505dd4ab76 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -234,6 +234,7 @@ void EditorAssetLibraryItemDescription::_preview_click(int p_id) {
if (!preview_images[i].is_video) {
if (preview_images[i].image.is_valid()) {
preview->set_texture(preview_images[i].image);
+ minimum_size_changed();
}
} else {
_link_click(preview_images[i].video_link);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 0946abdeab..83072534b8 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1409,15 +1409,18 @@ void ScriptEditor::_update_members_overview_visibility() {
if (!se) {
members_overview_alphabeta_sort_button->set_visible(false);
members_overview->set_visible(false);
+ overview_vbox->set_visible(false);
return;
}
if (members_overview_enabled && se->show_members_overview()) {
members_overview_alphabeta_sort_button->set_visible(true);
members_overview->set_visible(true);
+ overview_vbox->set_visible(true);
} else {
members_overview_alphabeta_sort_button->set_visible(false);
members_overview->set_visible(false);
+ overview_vbox->set_visible(false);
}
}
@@ -1468,9 +1471,11 @@ void ScriptEditor::_update_help_overview_visibility() {
if (help_overview_enabled) {
members_overview_alphabeta_sort_button->set_visible(false);
help_overview->set_visible(true);
+ overview_vbox->set_visible(true);
filename->set_text(se->get_name());
} else {
help_overview->set_visible(false);
+ overview_vbox->set_visible(false);
}
}
@@ -2682,19 +2687,19 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
add_child(context_menu);
context_menu->connect("id_pressed", this, "_menu_option");
- members_overview_vbox = memnew(VBoxContainer);
- members_overview_vbox->set_custom_minimum_size(Size2(0, 90));
- members_overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
+ overview_vbox = memnew(VBoxContainer);
+ overview_vbox->set_custom_minimum_size(Size2(0, 90));
+ overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
- list_split->add_child(members_overview_vbox);
- members_overview_buttons_hbox = memnew(HBoxContainer);
- members_overview_vbox->add_child(members_overview_buttons_hbox);
+ list_split->add_child(overview_vbox);
+ buttons_hbox = memnew(HBoxContainer);
+ overview_vbox->add_child(buttons_hbox);
filename = memnew(Label);
filename->set_clip_text(true);
filename->set_h_size_flags(SIZE_EXPAND_FILL);
filename->add_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_stylebox("normal", "LineEdit"));
- members_overview_buttons_hbox->add_child(filename);
+ buttons_hbox->add_child(filename);
members_overview_alphabeta_sort_button = memnew(ToolButton);
members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list."));
@@ -2702,10 +2707,10 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically"));
members_overview_alphabeta_sort_button->connect("toggled", this, "_toggle_members_overview_alpha_sort");
- members_overview_buttons_hbox->add_child(members_overview_alphabeta_sort_button);
+ buttons_hbox->add_child(members_overview_alphabeta_sort_button);
members_overview = memnew(ItemList);
- members_overview_vbox->add_child(members_overview);
+ overview_vbox->add_child(members_overview);
members_overview->set_allow_reselect(true);
members_overview->set_custom_minimum_size(Size2(0, 90)); //need to give a bit of limit to avoid it from disappearing
@@ -2714,7 +2719,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview->set_drag_forwarding(this);
help_overview = memnew(ItemList);
- members_overview_vbox->add_child(help_overview);
+ overview_vbox->add_child(help_overview);
help_overview->set_allow_reselect(true);
help_overview->set_custom_minimum_size(Size2(0, 90)); //need to give a bit of limit to avoid it from disappearing
help_overview->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 3707f39d11..769612bdb6 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -199,8 +199,8 @@ class ScriptEditor : public PanelContainer {
ItemList *script_list;
HSplitContainer *script_split;
ItemList *members_overview;
- VBoxContainer *members_overview_vbox;
- HBoxContainer *members_overview_buttons_hbox;
+ VBoxContainer *overview_vbox;
+ HBoxContainer *buttons_hbox;
Label *filename;
ToolButton *members_overview_alphabeta_sort_button;
bool members_overview_enabled;