Fix wrong placement of the Make Floating Button.

This commit is contained in:
ajreckof 2023-06-21 01:00:37 +02:00
parent c0d8d91b15
commit 13e65da804
3 changed files with 13 additions and 12 deletions

View file

@ -3999,16 +3999,6 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
menu_hb->add_child(help_search);
help_search->set_tooltip_text(TTR("Search the reference documentation."));
if (p_wrapper->is_window_available()) {
make_floating = memnew(ScreenSelect);
make_floating->set_flat(true);
make_floating->set_tooltip_text(TTR("Make the script editor floating."));
make_floating->connect("request_open_in_screen", callable_mp(window_wrapper, &WindowWrapper::enable_window_on_screen).bind(true));
menu_hb->add_child(make_floating);
p_wrapper->connect("window_visibility_changed", callable_mp(this, &ScriptEditor::_window_changed));
}
menu_hb->add_child(memnew(VSeparator));
script_back = memnew(Button);
@ -4025,6 +4015,18 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
script_forward->set_disabled(true);
script_forward->set_tooltip_text(TTR("Go to next edited document."));
if (p_wrapper->is_window_available()) {
menu_hb->add_child(memnew(VSeparator));
make_floating = memnew(ScreenSelect);
make_floating->set_flat(true);
make_floating->set_tooltip_text(TTR("Make the script editor floating."));
make_floating->connect("request_open_in_screen", callable_mp(window_wrapper, &WindowWrapper::enable_window_on_screen).bind(true));
menu_hb->add_child(make_floating);
p_wrapper->connect("window_visibility_changed", callable_mp(this, &ScriptEditor::_window_changed));
}
tab_container->connect("tab_changed", callable_mp(this, &ScriptEditor::_tab_changed));
erase_tab_confirm = memnew(ConfirmationDialog);