From 29d3ecf29a411552809ca95f82ff15a25ea5e420 Mon Sep 17 00:00:00 2001 From: "Daniel J. Ramirez" Date: Thu, 21 Sep 2017 15:55:07 -0500 Subject: [PATCH] Improved a lot of icons, and some style fixes --- editor/editor_themes.cpp | 10 ++++++++++ editor/icons/icon_audio_bus_bypass.svg | 2 +- editor/icons/icon_audio_bus_mute.svg | 2 +- editor/icons/icon_audio_bus_solo.svg | 2 +- editor/icons/icon_editor_3d_handle.svg | 1 + editor/icons/icon_editor_control_anchor.svg | 4 ++-- editor/icons/icon_editor_handle.svg | 9 +++++---- editor/icons/icon_editor_pivot.svg | 2 +- editor/icons/icon_gizmo_camera.svg | 1 + editor/icons/icon_gizmo_directional_light.svg | 1 + editor/icons/icon_gizmo_g_i_probe.svg | 3 ++- editor/icons/icon_gizmo_light.svg | 1 + editor/icons/icon_gizmo_listener.svg | 1 + editor/icons/icon_gizmo_particles.svg | 1 + editor/icons/icon_gizmo_reflection_probe.svg | 5 +++-- editor/icons/icon_gizmo_spatial_sample_player.svg | 5 +++-- editor/icons/icon_gizmo_spatial_stream_player.svg | 5 +++-- editor/icons/icon_gizmo_spot_light.svg | 1 + editor/icons/icon_group_viewport.svg | 7 +++++++ editor/icons/icon_lock.svg | 7 ++----- editor/icons/icon_lock_viewport.svg | 6 ++++++ editor/icons/icon_matrix.svg | 5 ----- editor/icons/icon_snap.svg | 2 +- editor/icons/icon_snap_grid.svg | 2 +- editor/icons/icon_unlock.svg | 6 ++---- editor/icons/icon_zoom_less.svg | 5 +++-- editor/icons/icon_zoom_more.svg | 5 +++-- editor/icons/icon_zoom_reset.svg | 5 +++-- editor/plugins/canvas_item_editor_plugin.cpp | 4 ++-- 29 files changed, 69 insertions(+), 41 deletions(-) create mode 100644 editor/icons/icon_group_viewport.svg create mode 100644 editor/icons/icon_lock_viewport.svg delete mode 100644 editor/icons/icon_matrix.svg diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 791b3ee92c2..51fdef37cf9 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -168,6 +168,11 @@ void editor_register_and_generate_icons(Ref p_theme, bool dark_theme = tr exceptions.push_back("GuiCloseCustomizable"); exceptions.push_back("GuiGraphNodePort"); exceptions.push_back("GuiResizer"); + exceptions.push_back("ZoomMore"); + exceptions.push_back("ZoomLess"); + exceptions.push_back("ZoomReset"); + exceptions.push_back("LockViewport"); + exceptions.push_back("GroupViewport"); clock_t begin_time = clock(); @@ -528,7 +533,9 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons")); theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons")); theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons")); + theme->set_icon("submenu", "PopupMenu", theme->get_icon("ArrowRight", "EditorIcons")); theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size) * EDSCALE); + // Tree & ItemList background Ref style_tree_bg = style_default->duplicate(); style_tree_bg->set_bg_color(dark_color_1); @@ -548,6 +555,9 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_color("custom_button_font_highlight", "Tree", font_color_hl); theme->set_color("font_color", "Tree", font_color); theme->set_color("font_color_selected", "Tree", font_color); + theme->set_color("title_button_color", "Tree", font_color); + theme->set_color("guide_color", "Tree", Color(mono_color.r, mono_color.g, mono_color.b, 0.05)); + theme->set_color("drop_position_color", "Tree", accent_color); theme->set_constant("vseparation", "Tree", (extra_spacing + default_margin_size) * EDSCALE); Ref style_tree_btn = style_default->duplicate(); diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/icon_audio_bus_bypass.svg index 75c1caf7f1d..f85c9d17b5f 100644 --- a/editor/icons/icon_audio_bus_bypass.svg +++ b/editor/icons/icon_audio_bus_bypass.svg @@ -1,5 +1,5 @@ - + diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/icon_audio_bus_mute.svg index a7d085d5359..cacca295ebc 100644 --- a/editor/icons/icon_audio_bus_mute.svg +++ b/editor/icons/icon_audio_bus_mute.svg @@ -1,5 +1,5 @@ - + diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/icon_audio_bus_solo.svg index e84c1cca25f..25e26d60384 100644 --- a/editor/icons/icon_audio_bus_solo.svg +++ b/editor/icons/icon_audio_bus_solo.svg @@ -1,5 +1,5 @@ - + diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/icon_editor_3d_handle.svg index 189baf3dad9..cd28f8d22e9 100644 --- a/editor/icons/icon_editor_3d_handle.svg +++ b/editor/icons/icon_editor_3d_handle.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/icon_editor_control_anchor.svg index eeee2c182f4..5e75f9bdf5d 100644 --- a/editor/icons/icon_editor_control_anchor.svg +++ b/editor/icons/icon_editor_control_anchor.svg @@ -1,8 +1,8 @@ - + + - diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/icon_editor_handle.svg index 7e58aaa8032..05f3e2f2cc7 100644 --- a/editor/icons/icon_editor_handle.svg +++ b/editor/icons/icon_editor_handle.svg @@ -1,6 +1,7 @@ - - - - + + + + + diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/icon_editor_pivot.svg index d59d2d804d9..8b8d07c7de2 100644 --- a/editor/icons/icon_editor_pivot.svg +++ b/editor/icons/icon_editor_pivot.svg @@ -1,6 +1,6 @@ - + diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/icon_gizmo_camera.svg index f6e5f885e76..cb80c165983 100644 --- a/editor/icons/icon_gizmo_camera.svg +++ b/editor/icons/icon_gizmo_camera.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/icon_gizmo_directional_light.svg index f7fa732501a..1b125b44ded 100644 --- a/editor/icons/icon_gizmo_directional_light.svg +++ b/editor/icons/icon_gizmo_directional_light.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/icon_gizmo_g_i_probe.svg index 7d3adf41965..815da4d5c3d 100644 --- a/editor/icons/icon_gizmo_g_i_probe.svg +++ b/editor/icons/icon_gizmo_g_i_probe.svg @@ -1,5 +1,6 @@ - + + diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/icon_gizmo_light.svg index c411d13dc7d..0db2749e913 100644 --- a/editor/icons/icon_gizmo_light.svg +++ b/editor/icons/icon_gizmo_light.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/icon_gizmo_listener.svg index adb6aebaecf..9b74469b67f 100644 --- a/editor/icons/icon_gizmo_listener.svg +++ b/editor/icons/icon_gizmo_listener.svg @@ -1,6 +1,7 @@ + diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/icon_gizmo_particles.svg index 05fc84619e6..0989c1acad6 100644 --- a/editor/icons/icon_gizmo_particles.svg +++ b/editor/icons/icon_gizmo_particles.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/icon_gizmo_reflection_probe.svg index 6d80e73b8c8..bcfd6e53f97 100644 --- a/editor/icons/icon_gizmo_reflection_probe.svg +++ b/editor/icons/icon_gizmo_reflection_probe.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/icon_gizmo_spatial_sample_player.svg index 7dbb4744bea..aa692485032 100644 --- a/editor/icons/icon_gizmo_spatial_sample_player.svg +++ b/editor/icons/icon_gizmo_spatial_sample_player.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/icons/icon_gizmo_spatial_stream_player.svg b/editor/icons/icon_gizmo_spatial_stream_player.svg index 2cf39663645..1470d3bfba4 100644 --- a/editor/icons/icon_gizmo_spatial_stream_player.svg +++ b/editor/icons/icon_gizmo_spatial_stream_player.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/icon_gizmo_spot_light.svg index 9b4ddadd17a..1881b6b60a9 100644 --- a/editor/icons/icon_gizmo_spot_light.svg +++ b/editor/icons/icon_gizmo_spot_light.svg @@ -1,5 +1,6 @@ + diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/icon_group_viewport.svg new file mode 100644 index 00000000000..350fb4103fb --- /dev/null +++ b/editor/icons/icon_group_viewport.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/editor/icons/icon_lock.svg b/editor/icons/icon_lock.svg index b0b01256480..1202f1d86f4 100644 --- a/editor/icons/icon_lock.svg +++ b/editor/icons/icon_lock.svg @@ -1,8 +1,5 @@ - - - - - + + diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/icon_lock_viewport.svg new file mode 100644 index 00000000000..54dc9f6b829 --- /dev/null +++ b/editor/icons/icon_lock_viewport.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/editor/icons/icon_matrix.svg b/editor/icons/icon_matrix.svg deleted file mode 100644 index ff5b1b08089..00000000000 --- a/editor/icons/icon_matrix.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/editor/icons/icon_snap.svg b/editor/icons/icon_snap.svg index 83e7b47fab0..0e535b11ce2 100644 --- a/editor/icons/icon_snap.svg +++ b/editor/icons/icon_snap.svg @@ -1,6 +1,6 @@ - + diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/icon_snap_grid.svg index 1cb9140f1f9..7124bd918e6 100644 --- a/editor/icons/icon_snap_grid.svg +++ b/editor/icons/icon_snap_grid.svg @@ -1,6 +1,6 @@ - + diff --git a/editor/icons/icon_unlock.svg b/editor/icons/icon_unlock.svg index 10ea82cbcfd..591b3d01022 100644 --- a/editor/icons/icon_unlock.svg +++ b/editor/icons/icon_unlock.svg @@ -1,7 +1,5 @@ - - - - + + diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/icon_zoom_less.svg index c78262841cf..aebadf443fc 100644 --- a/editor/icons/icon_zoom_less.svg +++ b/editor/icons/icon_zoom_less.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/icon_zoom_more.svg index 55323cf96ef..be1e13d145f 100644 --- a/editor/icons/icon_zoom_more.svg +++ b/editor/icons/icon_zoom_more.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/icon_zoom_reset.svg index 3ba2a149c84..aa5ad037278 100644 --- a/editor/icons/icon_zoom_reset.svg +++ b/editor/icons/icon_zoom_reset.svg @@ -1,5 +1,6 @@ - - + + + diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index bc5f11e7343..909b7dda9fe 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2595,12 +2595,12 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p } if (ci) { - Ref lock = get_icon("Lock", "EditorIcons"); + Ref lock = get_icon("LockViewport", "EditorIcons"); if (p_node->has_meta("_edit_lock_")) { lock->draw(viewport_ci, transform_ci.xform(Point2(0, 0))); } - Ref group = get_icon("Group", "EditorIcons"); + Ref group = get_icon("GroupViewport", "EditorIcons"); if (ci->has_meta("_edit_group_")) { Vector2 ofs = transform_ci.xform(Point2(0, 0)); if (ci->has_meta("_edit_lock_"))