Popups are now windows also (broken!)

This commit is contained in:
Juan Linietsky 2020-03-12 09:37:40 -03:00
parent 543fb1c4da
commit 441f1a5fe9
159 changed files with 3311 additions and 3285 deletions

View file

@ -592,7 +592,7 @@ void ThemeEditor::_notification(int p_what) {
}
} break;
case NOTIFICATION_THEME_CHANGED: {
theme_menu->set_icon(get_icon("Theme", "EditorIcons"));
theme_menu->set_icon(get_theme_icon("Theme", "EditorIcons"));
} break;
}
}
@ -645,10 +645,10 @@ ThemeEditor::ThemeEditor() {
main_container = memnew(MarginContainer);
root_container->add_child(main_container);
main_container->add_constant_override("margin_right", 4 * EDSCALE);
main_container->add_constant_override("margin_top", 4 * EDSCALE);
main_container->add_constant_override("margin_left", 4 * EDSCALE);
main_container->add_constant_override("margin_bottom", 4 * EDSCALE);
main_container->add_theme_constant_override("margin_right", 4 * EDSCALE);
main_container->add_theme_constant_override("margin_top", 4 * EDSCALE);
main_container->add_theme_constant_override("margin_left", 4 * EDSCALE);
main_container->add_theme_constant_override("margin_bottom", 4 * EDSCALE);
HBoxContainer *main_hb = memnew(HBoxContainer);
main_container->add_child(main_hb);
@ -656,7 +656,7 @@ ThemeEditor::ThemeEditor() {
VBoxContainer *first_vb = memnew(VBoxContainer);
main_hb->add_child(first_vb);
first_vb->set_h_size_flags(SIZE_EXPAND_FILL);
first_vb->add_constant_override("separation", 10 * EDSCALE);
first_vb->add_theme_constant_override("separation", 10 * EDSCALE);
first_vb->add_child(memnew(Label("Label")));
@ -716,7 +716,7 @@ ThemeEditor::ThemeEditor() {
VBoxContainer *second_vb = memnew(VBoxContainer);
second_vb->set_h_size_flags(SIZE_EXPAND_FILL);
main_hb->add_child(second_vb);
second_vb->add_constant_override("separation", 10 * EDSCALE);
second_vb->add_theme_constant_override("separation", 10 * EDSCALE);
LineEdit *le = memnew(LineEdit);
le->set_text("LineEdit");
second_vb->add_child(le);
@ -756,7 +756,7 @@ ThemeEditor::ThemeEditor() {
VBoxContainer *third_vb = memnew(VBoxContainer);
third_vb->set_h_size_flags(SIZE_EXPAND_FILL);
third_vb->add_constant_override("separation", 10 * EDSCALE);
third_vb->add_theme_constant_override("separation", 10 * EDSCALE);
main_hb->add_child(third_vb);
TabContainer *tc = memnew(TabContainer);
@ -776,7 +776,7 @@ ThemeEditor::ThemeEditor() {
Tree *test_tree = memnew(Tree);
third_vb->add_child(test_tree);
test_tree->set_custom_minimum_size(Size2(0, 175) * EDSCALE);
test_tree->add_constant_override("draw_relationship_lines", 1);
test_tree->add_theme_constant_override("draw_relationship_lines", 1);
TreeItem *item = test_tree->create_item();
item->set_text(0, "Tree");
@ -802,7 +802,7 @@ ThemeEditor::ThemeEditor() {
item->set_text(0, TTR("Has,Many,Options"));
item->set_range(0, 2);
main_hb->add_constant_override("separation", 20 * EDSCALE);
main_hb->add_theme_constant_override("separation", 20 * EDSCALE);
////////
@ -846,7 +846,7 @@ ThemeEditor::ThemeEditor() {
name_menu->set_text("..");
name_hbc->add_child(name_menu);
name_menu->get_popup()->connect("about_to_show", callable_mp(this, &ThemeEditor::_name_menu_about_to_show));
name_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ThemeEditor::_name_menu_about_to_show));
name_menu->get_popup()->connect("id_pressed", callable_mp(this, &ThemeEditor::_name_menu_cbk));
type_select_label = memnew(Label);