Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermefelipecgs authored and malcolmhoward committed Jul 31, 2018
1 parent 28ba56b commit 7b8600c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
21 changes: 11 additions & 10 deletions editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,7 @@ 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);
Expand Down Expand Up @@ -2937,30 +2938,30 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {

buttons_hbox->add_child(members_overview_alphabeta_sort_button);

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."));
members_overview_alphabeta_sort_button->set_toggle_mode(true);
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
Expand All @@ -2969,7 +2970,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);
Expand Down
4 changes: 2 additions & 2 deletions editor/plugins/script_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,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;
Expand Down
7 changes: 3 additions & 4 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ void Control::_update_minimum_size_cache() {
minsize.y = MAX(minsize.y, data.custom_minimum_size.y);
data.minimum_size_cache = minsize;
data.minimum_size_valid = true;
minimum_size_changed();
}

Size2 Control::get_combined_minimum_size() const {
Expand Down Expand Up @@ -452,10 +453,8 @@ void Control::_notification(int p_notification) {

} break;
case NOTIFICATION_POST_ENTER_TREE: {
if (is_visible_in_tree()) {
data.minimum_size_valid = false;
_size_changed();
}
data.minimum_size_valid = false;
_size_changed();
} break;
case NOTIFICATION_EXIT_TREE: {

Expand Down

0 comments on commit 7b8600c

Please sign in to comment.