From e5de5b4908fd31954c36662da83c7cf3f60fe2fb Mon Sep 17 00:00:00 2001 From: "Daniel J. Ramirez" Date: Mon, 20 Nov 2017 13:03:22 -0600 Subject: Visual fixes Added some icons (Including the onion one) Fixed text editor ellipsis style and editor tabs --- editor/editor_themes.cpp | 7 +++++++ editor/icons/icon_GUI_ellipsis.svg | 5 +++++ editor/icons/icon_animation.svg | 4 +--- editor/icons/icon_area.svg | 4 +--- editor/icons/icon_area_2d.svg | 4 +--- editor/icons/icon_array_mesh.svg | 4 +--- editor/icons/icon_editor_handle_add.svg | 6 ------ editor/icons/icon_editor_handle_selected.svg | 6 ------ editor/icons/icon_h_button_array.svg | 5 ----- editor/icons/icon_onion.svg | 3 +++ editor/icons/icon_v_button_array.svg | 6 ------ editor/plugins/script_editor_plugin.cpp | 2 +- scene/gui/text_edit.cpp | 6 ++++-- 13 files changed, 24 insertions(+), 38 deletions(-) create mode 100644 editor/icons/icon_GUI_ellipsis.svg delete mode 100644 editor/icons/icon_editor_handle_add.svg delete mode 100644 editor/icons/icon_editor_handle_selected.svg delete mode 100644 editor/icons/icon_h_button_array.svg create mode 100644 editor/icons/icon_onion.svg delete mode 100644 editor/icons/icon_v_button_array.svg diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 0f9f50095d..ae29b7420e 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -738,6 +738,13 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_stylebox("button", "Tabs", style_menu); theme->set_icon("increment", "TabContainer", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); theme->set_icon("decrement", "TabContainer", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); + theme->set_icon("increment", "Tabs", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); + theme->set_icon("decrement", "Tabs", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); + theme->set_icon("increment_highlight", "Tabs", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); + theme->set_icon("decrement_highlight", "Tabs", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); + theme->set_icon("increment_highlight", "TabContainer", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); + theme->set_icon("decrement_highlight", "TabContainer", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); + theme->set_constant("hseparation", "Tabs", 4 * EDSCALE); // Content of each tab Ref style_content_panel = style_default->duplicate(); diff --git a/editor/icons/icon_GUI_ellipsis.svg b/editor/icons/icon_GUI_ellipsis.svg new file mode 100644 index 0000000000..5565fd2947 --- /dev/null +++ b/editor/icons/icon_GUI_ellipsis.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/editor/icons/icon_animation.svg b/editor/icons/icon_animation.svg index 146403ece5..600faeeddb 100644 --- a/editor/icons/icon_animation.svg +++ b/editor/icons/icon_animation.svg @@ -1,5 +1,3 @@ - - - + diff --git a/editor/icons/icon_area.svg b/editor/icons/icon_area.svg index ac673d10fc..5e1a385f58 100644 --- a/editor/icons/icon_area.svg +++ b/editor/icons/icon_area.svg @@ -1,5 +1,3 @@ - - - + diff --git a/editor/icons/icon_area_2d.svg b/editor/icons/icon_area_2d.svg index d6ecb6abe5..28fc4d7804 100644 --- a/editor/icons/icon_area_2d.svg +++ b/editor/icons/icon_area_2d.svg @@ -1,5 +1,3 @@ - - - + diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/icon_array_mesh.svg index 68890c4366..867fc95b0c 100644 --- a/editor/icons/icon_array_mesh.svg +++ b/editor/icons/icon_array_mesh.svg @@ -1,5 +1,3 @@ - - - + diff --git a/editor/icons/icon_editor_handle_add.svg b/editor/icons/icon_editor_handle_add.svg deleted file mode 100644 index 0e7fe7129a..0000000000 --- a/editor/icons/icon_editor_handle_add.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/editor/icons/icon_editor_handle_selected.svg b/editor/icons/icon_editor_handle_selected.svg deleted file mode 100644 index 8d338c1fbd..0000000000 --- a/editor/icons/icon_editor_handle_selected.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/editor/icons/icon_h_button_array.svg b/editor/icons/icon_h_button_array.svg deleted file mode 100644 index 3f95dbbde1..0000000000 --- a/editor/icons/icon_h_button_array.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/editor/icons/icon_onion.svg b/editor/icons/icon_onion.svg new file mode 100644 index 0000000000..5bb2a99423 --- /dev/null +++ b/editor/icons/icon_onion.svg @@ -0,0 +1,3 @@ + + + diff --git a/editor/icons/icon_v_button_array.svg b/editor/icons/icon_v_button_array.svg deleted file mode 100644 index ac7ce6064c..0000000000 --- a/editor/icons/icon_v_button_array.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 32ec9b2ba9..3c2d52c128 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2897,7 +2897,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) { EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled", true); EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true); EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15); - EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.5)); + EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.3)); EDITOR_DEF("text_editor/open_scripts/group_help_pages", true); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path")); EDITOR_DEF("text_editor/open_scripts/sort_scripts_by", 0); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c9af7eed0d..21842d4d58 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1238,7 +1238,9 @@ void TextEdit::_notification(int p_what) { char_ofs += char_w; if (j == str.length() - 1 && is_folded(line)) { - cache.folded_eol_icon->draw(ci, Point2(char_ofs + char_margin, ofs_y), Color(1, 1, 1, 1), true); + int yofs = (get_row_height() - cache.folded_eol_icon->get_height()) / 2; + int xofs = cache.folded_eol_icon->get_width() / 2; + cache.folded_eol_icon->draw(ci, Point2(char_ofs + char_margin + xofs, ofs_y + yofs), Color(1, 1, 1, 1)); } } @@ -3937,7 +3939,7 @@ void TextEdit::_update_caches() { cache.tab_icon = get_icon("tab"); cache.folded_icon = get_icon("GuiTreeArrowRight", "EditorIcons"); cache.can_fold_icon = get_icon("GuiTreeArrowDown", "EditorIcons"); - cache.folded_eol_icon = get_icon("GuiTabMenu", "EditorIcons"); + cache.folded_eol_icon = get_icon("GuiEllipsis", "EditorIcons"); text.set_font(cache.font); } -- cgit v1.2.3