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

@ -1 +1 @@
<svg height="16" viewBox="0 0 4.2333333 4.2333333" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m1.2907908.14089245c-.258841 0-.46866132.20982028-.46866132.46866151v.23432634h3.28061252v-.23432634c0-.25884123-.2098291-.46866151-.4686613-.46866151zm2.1089635.23433517h.2343264v.23432634h-.2343264zm-2.57762482.70298788v1.8746284c0 .2588412.20982912.4686614.46866132.4686614h2.3432899c.258841 0 .4686613-.2098202.4686613-.4686614v-1.8746284z" stroke-width=".23433"/><path d="m12.189144-6.0533422 5.5-5.4999998-2.44-2.439h7v6.9999998l-2.439-2.439-5.5 5.5z" stroke="#000" stroke-width="1.01435" transform="matrix(.19814944 0 0 .19814944 -2.163454 4.759098)"/></g></svg>
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="5" height="10" width="11" rx="1.5" fill="#919191"/><path d="M5.5 1A1.5 1.5 0 0 0 4 2.5V3h11v-.5A1.5 1.5 0 0 0 13.5 1zM4 4v5.5A1.5 1.5 0 0 0 5.5 11h8A1.5 1.5 0 0 0 15 9.5V4z" fill="#e0e0e0"/></svg>

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 295 B

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);

View file

@ -432,7 +432,6 @@ void ScreenSelect::pressed() {
}
ScreenSelect::ScreenSelect() {
set_text(TTR("Make Floating"));
set_tooltip_text(TTR("Make this panel floating.\nRight click to open the screen selector."));
set_button_mask(MouseButtonMask::RIGHT);
set_flat(true);