Merge pull request #43988 from Chaosus/fix_toggle_script_panel_button

Reversed Toggle Script Button icon
This commit is contained in:
Yuri Roubinsky 2020-11-30 17:51:24 +03:00 committed by GitHub
commit 193cc9a157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1562,9 +1562,9 @@ void CodeTextEditor::_set_show_warnings_panel(bool p_show) {
void CodeTextEditor::_toggle_scripts_pressed() { void CodeTextEditor::_toggle_scripts_pressed() {
if (is_layout_rtl()) { if (is_layout_rtl()) {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
} else {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Forward", "EditorIcons") : get_theme_icon("Back", "EditorIcons")); toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Forward", "EditorIcons") : get_theme_icon("Back", "EditorIcons"));
} else {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
} }
} }
@ -1687,9 +1687,9 @@ void CodeTextEditor::show_toggle_scripts_button() {
void CodeTextEditor::update_toggle_scripts_button() { void CodeTextEditor::update_toggle_scripts_button() {
if (is_layout_rtl()) { if (is_layout_rtl()) {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
} else {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Forward", "EditorIcons") : get_theme_icon("Back", "EditorIcons")); toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Forward", "EditorIcons") : get_theme_icon("Back", "EditorIcons"));
} else {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
} }
toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")"); toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
} }