Skip to content

Commit

Permalink
Visual fixes
Browse files Browse the repository at this point in the history
Added some icons (Including the onion one)
Fixed text editor ellipsis style and editor tabs
  • Loading branch information
djrm committed Nov 20, 2017
1 parent 82ad05a commit e5de5b4
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 38 deletions.
7 changes: 7 additions & 0 deletions editor/editor_themes.cpp
Expand Up @@ -738,6 +738,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> 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<StyleBoxFlat> style_content_panel = style_default->duplicate();
Expand Down
5 changes: 5 additions & 0 deletions editor/icons/icon_GUI_ellipsis.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions editor/icons/icon_animation.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions editor/icons/icon_area.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions editor/icons/icon_area_2d.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions editor/icons/icon_array_mesh.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions editor/icons/icon_editor_handle_add.svg

This file was deleted.

6 changes: 0 additions & 6 deletions editor/icons/icon_editor_handle_selected.svg

This file was deleted.

5 changes: 0 additions & 5 deletions editor/icons/icon_h_button_array.svg

This file was deleted.

3 changes: 3 additions & 0 deletions editor/icons/icon_onion.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions editor/icons/icon_v_button_array.svg

This file was deleted.

2 changes: 1 addition & 1 deletion editor/plugins/script_editor_plugin.cpp
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions scene/gui/text_edit.cpp
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit e5de5b4

Please sign in to comment.