diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-10-01 21:30:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-01 21:30:43 +0200 |
commit | 6af38d119eb80e8ae69c0b5c72c9cd2f8c2e347a (patch) | |
tree | 2564905b36419b7601997d596521b6e1b18ab8f6 /editor/editor_node.cpp | |
parent | 99a464ceb4da8558e35d933a30dbaba8025860d8 (diff) | |
parent | e8c620abac374dd29b2c81b6bce4ed70a6970277 (diff) |
Merge pull request #11399 from toger5/bottom_panel_debugger
Bottom panel debugger
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c569f62b5b..a04ded7b5b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -308,6 +308,10 @@ void EditorNode::_notification(int p_what) { } _update_scene_tabs(); + // debugger area + if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) + bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); + //_update_icons for (int i = 0; i < singleton->main_editor_buttons.size(); i++) { main_editor_buttons[i]->set_icon(gui_base->get_icon(singleton->main_editor_buttons[i]->get_name(), "EditorIcons")); @@ -4062,29 +4066,25 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) { ERR_FAIL_INDEX(p_idx, bottom_panel_items.size()); if (p_enable) { - // this is the debug panel wich uses tabs, so the top section should be smaller - if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { - Ref<StyleBoxFlat> style_panel_invisible_top = gui_base->get_stylebox("debugger_panel", "EditorStyles"); - bottom_panel->add_style_override("panel", style_panel_invisible_top); - } else { - bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer")); - } for (int i = 0; i < bottom_panel_items.size(); i++) { bottom_panel_items[i].button->set_pressed(i == p_idx); bottom_panel_items[i].control->set_visible(i == p_idx); } + if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { // this is the debug panel wich uses tabs, so the top section should be smaller + bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); + } else { + bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer")); + } center_split->set_dragger_visibility(SplitContainer::DRAGGER_VISIBLE); center_split->set_collapsed(false); } else { bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer")); - for (int i = 0; i < bottom_panel_items.size(); i++) { bottom_panel_items[i].button->set_pressed(false); bottom_panel_items[i].control->set_visible(false); } - center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN); center_split->set_collapsed(true); } |