commit
2153feb6fd
9 changed files with 90 additions and 3 deletions
|
@ -4942,11 +4942,13 @@ EditorNode::EditorNode() {
|
|||
//top_dark_vb->add_child(scene_tabs);
|
||||
//left
|
||||
left_l_hsplit = memnew(HSplitContainer);
|
||||
left_l_hsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
main_vbox->add_child(left_l_hsplit);
|
||||
|
||||
left_l_hsplit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
left_l_vsplit = memnew(VSplitContainer);
|
||||
left_l_vsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
left_l_hsplit->add_child(left_l_vsplit);
|
||||
dock_slot[DOCK_SLOT_LEFT_UL] = memnew(TabContainer);
|
||||
left_l_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_UL]);
|
||||
|
@ -4957,8 +4959,10 @@ EditorNode::EditorNode() {
|
|||
dock_slot[DOCK_SLOT_LEFT_BL]->hide();
|
||||
|
||||
left_r_hsplit = memnew(HSplitContainer);
|
||||
left_r_hsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
left_l_hsplit->add_child(left_r_hsplit);
|
||||
left_r_vsplit = memnew(VSplitContainer);
|
||||
left_r_hsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
left_r_hsplit->add_child(left_r_vsplit);
|
||||
dock_slot[DOCK_SLOT_LEFT_UR] = memnew(TabContainer);
|
||||
left_r_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_UR]);
|
||||
|
@ -4969,6 +4973,7 @@ EditorNode::EditorNode() {
|
|||
//dock_slot[DOCK_SLOT_LEFT_BR]->hide();
|
||||
|
||||
main_hsplit = memnew(HSplitContainer);
|
||||
main_hsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
left_r_hsplit->add_child(main_hsplit);
|
||||
//main_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
VBoxContainer *center_vb = memnew(VBoxContainer);
|
||||
|
@ -4976,15 +4981,18 @@ EditorNode::EditorNode() {
|
|||
center_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
center_split = memnew(VSplitContainer);
|
||||
center_split->add_constant_override("separation", 8 * EDSCALE);
|
||||
//main_hsplit->add_child(center_split);
|
||||
center_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
center_split->set_collapsed(false);
|
||||
center_vb->add_child(center_split);
|
||||
|
||||
right_hsplit = memnew(HSplitContainer);
|
||||
right_hsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
main_hsplit->add_child(right_hsplit);
|
||||
|
||||
right_l_vsplit = memnew(VSplitContainer);
|
||||
right_l_vsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
right_hsplit->add_child(right_l_vsplit);
|
||||
dock_slot[DOCK_SLOT_RIGHT_UL] = memnew(TabContainer);
|
||||
right_l_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_UL]);
|
||||
|
@ -4995,6 +5003,7 @@ EditorNode::EditorNode() {
|
|||
//dock_slot[DOCK_SLOT_RIGHT_BL]->hide();
|
||||
|
||||
right_r_vsplit = memnew(VSplitContainer);
|
||||
right_r_vsplit->add_constant_override("separation", 8 * EDSCALE);
|
||||
right_hsplit->add_child(right_r_vsplit);
|
||||
dock_slot[DOCK_SLOT_RIGHT_UR] = memnew(TabContainer);
|
||||
right_r_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_UR]);
|
||||
|
@ -5048,13 +5057,12 @@ EditorNode::EditorNode() {
|
|||
dock_select_rect_over = -1;
|
||||
dock_popup_selected = -1;
|
||||
//dock_select_popoup->set_(Size2(20,20));
|
||||
|
||||
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
|
||||
dock_slot[i]->set_custom_minimum_size(Size2(230, 220) * EDSCALE);
|
||||
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
dock_slot[i]->set_popup(dock_select_popoup);
|
||||
dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
|
||||
|
||||
dock_slot[i]->add_constant_override("side_margin", 0);
|
||||
//dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
|
||||
}
|
||||
|
||||
|
@ -5065,6 +5073,7 @@ EditorNode::EditorNode() {
|
|||
dock_drag_timer->connect("timeout", this, "_save_docks");
|
||||
|
||||
top_split = memnew(VSplitContainer);
|
||||
top_split->add_constant_override("separation", 8 * EDSCALE);
|
||||
center_split->add_child(top_split);
|
||||
top_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
top_split->set_collapsed(true);
|
||||
|
@ -5092,6 +5101,7 @@ EditorNode::EditorNode() {
|
|||
|
||||
scene_root_parent = memnew(PanelContainer);
|
||||
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
|
||||
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
|
||||
|
||||
// Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel_full","PanelContainer");
|
||||
// scene_root_parent->add_style_override("panel",sp);
|
||||
|
@ -5117,6 +5127,7 @@ EditorNode::EditorNode() {
|
|||
|
||||
viewport = memnew(VBoxContainer);
|
||||
viewport->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
viewport->add_constant_override("separation", 0);
|
||||
/*for(int i=0;i<4;i++) {
|
||||
viewport->set_margin(Margin(i),sp->get_margin(Margin(i)));
|
||||
}*/
|
||||
|
@ -5680,7 +5691,7 @@ EditorNode::EditorNode() {
|
|||
_update_layouts_menu();
|
||||
|
||||
bottom_panel = memnew(PanelContainer);
|
||||
bottom_panel->add_style_override("panel", gui_base->get_stylebox("panelf", "Panel"));
|
||||
bottom_panel->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
|
||||
center_split->add_child(bottom_panel);
|
||||
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
|
||||
|
||||
|
|
|
@ -49,6 +49,71 @@ Ref<Theme> create_editor_theme() {
|
|||
}
|
||||
focus_sbt->set_draw_center(false);
|
||||
theme->set_stylebox("EditorFocus", "EditorStyles", focus_sbt);
|
||||
|
||||
Ref<StyleBoxFlat> style_panel(memnew(StyleBoxFlat));
|
||||
style_panel->set_bg_color(Color::html("#36424e"));
|
||||
style_panel->set_default_margin(MARGIN_LEFT, 1);
|
||||
style_panel->set_default_margin(MARGIN_RIGHT, 1);
|
||||
style_panel->set_default_margin(MARGIN_BOTTOM, 1);
|
||||
style_panel->set_default_margin(MARGIN_TOP, 4 * EDSCALE);
|
||||
theme->set_stylebox("panel", "TabContainer", style_panel);
|
||||
theme->set_stylebox("EditorPanel", "EditorStyles", style_panel);
|
||||
|
||||
Ref<StyleBoxFlat> style_bg(memnew(StyleBoxFlat));
|
||||
style_bg->set_bg_color(Color::html("#2b353f"));
|
||||
style_bg->set_default_margin(MARGIN_LEFT, 0);
|
||||
style_bg->set_default_margin(MARGIN_RIGHT, 0);
|
||||
style_bg->set_default_margin(MARGIN_BOTTOM, 0);
|
||||
style_bg->set_default_margin(MARGIN_TOP, 0);
|
||||
theme->set_stylebox("bg", "Tree", style_bg);
|
||||
theme->set_stylebox("bg", "ItemList", style_bg);
|
||||
theme->set_stylebox("EditorBG", "EditorStyles", style_bg);
|
||||
|
||||
Ref<StyleBoxFlat> style_tab(memnew(StyleBoxFlat));
|
||||
style_tab->set_default_margin(MARGIN_LEFT, 15 * EDSCALE);
|
||||
style_tab->set_default_margin(MARGIN_RIGHT, 15 * EDSCALE);
|
||||
style_tab->set_default_margin(MARGIN_BOTTOM, 5 * EDSCALE);
|
||||
style_tab->set_default_margin(MARGIN_TOP, 5 * EDSCALE);
|
||||
|
||||
Ref<StyleBoxFlat> style_tab_fg = style_tab->duplicate();
|
||||
style_tab_fg->set_bg_color(Color::html("#36424e"));
|
||||
|
||||
Ref<StyleBoxFlat> style_tab_bg = style_tab->duplicate();
|
||||
style_tab_bg->set_draw_center(false);
|
||||
|
||||
theme->set_stylebox("tab_fg", "TabContainer", style_tab_fg);
|
||||
theme->set_stylebox("tab_bg", "TabContainer", style_tab_bg);
|
||||
theme->set_stylebox("tab_fg", "Tabs", style_tab_fg);
|
||||
theme->set_stylebox("tab_bg", "Tabs", style_tab_bg);
|
||||
|
||||
Ref<StyleBoxFlat> style_panel_debugger(memnew(StyleBoxFlat));
|
||||
style_panel_debugger->set_bg_color(Color::html("#3e4c5a"));
|
||||
style_panel_debugger->set_default_margin(MARGIN_LEFT, 0);
|
||||
style_panel_debugger->set_default_margin(MARGIN_RIGHT, 0);
|
||||
style_panel_debugger->set_default_margin(MARGIN_BOTTOM, 0);
|
||||
style_panel_debugger->set_default_margin(MARGIN_TOP, 4 * EDSCALE);
|
||||
theme->set_stylebox("EditorPanelDebugger", "EditorStyles", style_panel_debugger);
|
||||
|
||||
Ref<StyleBoxFlat> style_tab_fg_debugger = style_tab->duplicate();
|
||||
style_tab_fg_debugger->set_bg_color(Color::html("#3e4c5a"));
|
||||
style_tab_fg_debugger->set_default_margin(MARGIN_LEFT, 10 * EDSCALE);
|
||||
style_tab_fg_debugger->set_default_margin(MARGIN_RIGHT, 10 * EDSCALE);
|
||||
Ref<StyleBoxFlat> style_tab_bg_debugger = style_tab->duplicate();
|
||||
style_tab_bg_debugger->set_draw_center(false);
|
||||
style_tab_bg_debugger->set_default_margin(MARGIN_LEFT, 10 * EDSCALE);
|
||||
style_tab_bg_debugger->set_default_margin(MARGIN_RIGHT, 10 * EDSCALE);
|
||||
|
||||
theme->set_stylebox("EditorTabFGDebugger", "EditorStyles", style_tab_fg_debugger);
|
||||
theme->set_stylebox("EditorTabBGDebugger", "EditorStyles", style_tab_bg_debugger);
|
||||
|
||||
Ref<StyleBoxFlat> style_textedit_normal(memnew(StyleBoxFlat));
|
||||
style_textedit_normal->set_bg_color(Color::html("#29343d"));
|
||||
style_textedit_normal->set_default_margin(MARGIN_LEFT, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_RIGHT, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_BOTTOM, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_TOP, 0);
|
||||
theme->set_stylebox("normal", "TextEdit", style_textedit_normal);
|
||||
|
||||
// theme->set_color("prop_category","Editor",Color::hex(0x3f3a44ff));
|
||||
// theme->set_color("prop_section","Editor",Color::hex(0x35313aff));
|
||||
// theme->set_color("prop_subsection","Editor",Color::hex(0x312e37ff));
|
||||
|
|
|
@ -1722,6 +1722,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
|
|||
tree->connect("item_rmb_selected", this, "_dir_rmb_pressed");
|
||||
|
||||
files = memnew(ItemList);
|
||||
files->add_style_override("bg", editor->get_gui_base()->get_stylebox("EditorBG", "EditorStyles"));
|
||||
files->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
files->set_select_mode(ItemList::SELECT_MULTI);
|
||||
files->set_drag_forwarding(this);
|
||||
|
@ -1735,6 +1736,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
|
|||
file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
path_hb = memnew(HBoxContainer);
|
||||
path_hb->add_child(memnew(Control));
|
||||
file_list_vb->add_child(path_hb);
|
||||
|
||||
button_back = memnew(ToolButton);
|
||||
|
|
|
@ -2024,6 +2024,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
add_child(menu_hb);
|
||||
|
||||
script_split = memnew(HSplitContainer);
|
||||
script_split->add_constant_override("separation", 8 * EDSCALE);
|
||||
add_child(script_split);
|
||||
script_split->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
|
@ -2033,6 +2034,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
script_split->set_split_offset(140);
|
||||
|
||||
tab_container = memnew(TabContainer);
|
||||
tab_container->add_style_override("panel", p_editor->get_gui_base()->get_stylebox("EditorBG", "EditorStyles"));
|
||||
tab_container->set_tabs_visible(false);
|
||||
script_split->add_child(tab_container);
|
||||
|
||||
|
|
|
@ -1322,6 +1322,7 @@ ScriptTextEditor::ScriptTextEditor() {
|
|||
|
||||
code_editor = memnew(CodeTextEditor);
|
||||
add_child(code_editor);
|
||||
code_editor->add_constant_override("separation", 0);
|
||||
code_editor->set_area_as_parent_rect();
|
||||
code_editor->connect("validate_script", this, "_validate_script");
|
||||
code_editor->connect("load_theme_settings", this, "_load_theme_settings");
|
||||
|
|
|
@ -1175,6 +1175,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
|
|||
data = p_data;
|
||||
|
||||
tab_container = memnew(TabContainer);
|
||||
tab_container->add_constant_override("side_margin", 0);
|
||||
add_child(tab_container);
|
||||
//set_child_rect(tab_container);
|
||||
|
||||
|
|
|
@ -1793,6 +1793,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
|
|||
VBoxContainer *vbc = this;
|
||||
|
||||
HBoxContainer *filter_hbc = memnew(HBoxContainer);
|
||||
filter_hbc->add_constant_override("separate", 0);
|
||||
ToolButton *tb;
|
||||
|
||||
ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KEY_MASK_CMD | KEY_A);
|
||||
|
|
|
@ -1551,6 +1551,9 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
|
|||
editor = p_editor;
|
||||
|
||||
tabs = memnew(TabContainer);
|
||||
tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("EditorPanelDebugger", "EditorStyles"));
|
||||
tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("EditorTabFGDebugger", "EditorStyles"));
|
||||
tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("EditorTabBGDebugger", "EditorStyles"));
|
||||
tabs->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
tabs->set_area_as_parent_rect();
|
||||
add_child(tabs);
|
||||
|
|
|
@ -300,6 +300,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
set_resizable(true);
|
||||
|
||||
tabs = memnew(TabContainer);
|
||||
tabs->add_constant_override("side_margin", 0);
|
||||
add_child(tabs);
|
||||
//set_child_rect(tabs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue