diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-07 15:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 15:54:32 +0100 |
commit | 650e218b9606e4640ac10ecbff1b7f08b6be0daf (patch) | |
tree | 9c04a47254fa312b66b9fd7945b0a346ade4a133 /editor/editor_node.cpp | |
parent | 8910d0bcb4a6c03acfbcb7ec4c585ed0f2e1f4d9 (diff) | |
parent | 59e9a8c275ac56bdc23883d8902920e93bcb6c69 (diff) |
Merge pull request #56768 from YeldhamDev/dock_float_theme
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b98b7fd3dc..a4b6790d1c 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4236,8 +4236,9 @@ void EditorNode::_dock_make_float() { Control *dock = dock_slot[dock_popup_selected]->get_current_tab_control(); ERR_FAIL_COND(!dock); - const Size2i borders = Size2i(4, 4) * EDSCALE; - Size2 dock_size = dock->get_size() + borders * 2; // remember size + Size2 borders = Size2(4, 4) * EDSCALE; + // Remember size and position before removing it from the main window. + Size2 dock_size = dock->get_size() + borders * 2; Point2 dock_screen_pos = dock->get_global_position() + get_tree()->get_root()->get_position() - borders; int dock_index = dock->get_index(); @@ -4246,7 +4247,7 @@ void EditorNode::_dock_make_float() { Window *window = memnew(Window); window->set_title(dock->get_name()); Panel *p = memnew(Panel); - p->set_mode(Panel::MODE_FOREGROUND); + p->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("PanelForeground"), SNAME("EditorStyles"))); p->set_anchors_and_offsets_preset(Control::PRESET_WIDE); window->add_child(p); MarginContainer *margin = memnew(MarginContainer); |