diff options
| author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-06-21 03:03:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-21 03:03:19 +0200 |
| commit | 38ae7b58d17b63def71a773c1da6cd17406f81a2 (patch) | |
| tree | caca5e279e9ea2d63e94b737aaad080a0e485d02 | |
| parent | 329652b6feac2114c4e30062f18ece36d4e3addc (diff) | |
| parent | 13e65da804f0b94423c20af739e0b53dc3fe91f0 (diff) | |
| download | redot-engine-38ae7b58d17b63def71a773c1da6cd17406f81a2.tar.gz | |
Merge pull request #78350 from ajreckof/you-know-when-you-want-to-search-this-member-you-don't-know-and-then-you-have-the-script-editor-all-over-the-place-now-it-should-not-happen-anymore-hopefully
Fix placement and style of the "Make Floating" button
| -rw-r--r-- | editor/icons/MakeFloating.svg | 2 | ||||
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 22 | ||||
| -rw-r--r-- | editor/window_wrapper.cpp | 1 |
3 files changed, 13 insertions, 12 deletions
diff --git a/editor/icons/MakeFloating.svg b/editor/icons/MakeFloating.svg index 57ccce38ea..916b1566e9 100644 --- a/editor/icons/MakeFloating.svg +++ b/editor/icons/MakeFloating.svg @@ -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> diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 51550acb94..c23a96bede 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -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); diff --git a/editor/window_wrapper.cpp b/editor/window_wrapper.cpp index 21b0a1a21d..3a8dbf017f 100644 --- a/editor/window_wrapper.cpp +++ b/editor/window_wrapper.cpp @@ -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); |
