Cleanup editor's top bar of old nodes

This commit is contained in:
Michael Alexsander Silva Dias 2019-02-11 02:18:54 -02:00
parent 6607c3c1c7
commit 3a70020c98
2 changed files with 6 additions and 16 deletions

View file

@ -326,7 +326,6 @@ void EditorNode::_notification(int p_what) {
gui_base->set_theme(theme);
gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
scene_tabs->add_style_override("tab_fg", gui_base->get_stylebox("SceneTabFG", "EditorStyles"));
@ -5203,11 +5202,8 @@ EditorNode::EditorNode() {
viewport->add_constant_override("separation", 0);
scene_root_parent->add_child(viewport);
PanelContainer *top_region = memnew(PanelContainer);
top_region->add_style_override("panel", gui_base->get_stylebox("MenuPanel", "EditorStyles"));
HBoxContainer *left_menu_hb = memnew(HBoxContainer);
top_region->add_child(left_menu_hb);
menu_hb->add_child(top_region);
menu_hb->add_child(left_menu_hb);
file_menu = memnew(MenuButton);
file_menu->set_flat(false);
@ -5337,11 +5333,10 @@ EditorNode::EditorNode() {
p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Q);
#endif
PanelContainer *editor_region = memnew(PanelContainer);
main_editor_button_vb = memnew(HBoxContainer);
editor_region->add_child(main_editor_button_vb);
menu_hb->add_spacer();
menu_hb->add_child(editor_region);
main_editor_button_vb = memnew(HBoxContainer);
menu_hb->add_child(main_editor_button_vb);
debug_menu = memnew(MenuButton);
debug_menu->set_flat(false);
@ -5430,11 +5425,8 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_icon_item(gui_base->get_icon("Godot", "EditorIcons"), TTR("About"), HELP_ABOUT);
play_button_panel = memnew(PanelContainer);
menu_hb->add_child(play_button_panel);
HBoxContainer *play_hb = memnew(HBoxContainer);
play_button_panel->add_child(play_hb);
menu_hb->add_child(play_hb);
play_button = memnew(ToolButton);
play_hb->add_child(play_button);
@ -5512,7 +5504,6 @@ EditorNode::EditorNode() {
video_driver = memnew(OptionButton);
video_driver->set_flat(true);
video_driver->set_focus_mode(Control::FOCUS_NONE);
video_driver->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
video_driver->connect("item_selected", this, "_video_driver_selected");
video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts"));
right_menu_hb->add_child(video_driver);
@ -5548,7 +5539,7 @@ EditorNode::EditorNode() {
layout_dialog->connect("name_confirmed", this, "_dialog_action");
update_menu = memnew(MenuButton);
update_menu->set_tooltip(TTR("Spins when the editor window repaints!"));
update_menu->set_tooltip(TTR("Spins when the editor window redraws."));
right_menu_hb->add_child(update_menu);
update_menu->set_icon(gui_base->get_icon("Progress1", "EditorIcons"));
update_menu->get_popup()->connect("id_pressed", this, "_menu_option");

View file

@ -200,7 +200,6 @@ private:
Control *theme_base;
Control *gui_base;
VBoxContainer *main_vbox;
PanelContainer *play_button_panel;
OptionButton *video_driver;
ConfirmationDialog *video_restart_dialog;