diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-29 07:46:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-29 07:46:47 +0200 |
commit | 13289002ddc0f3ceed897df05151cca88947cdce (patch) | |
tree | 0ce53fbd4f1a04d4507cf01539c52f128d678501 /editor/editor_themes.cpp | |
parent | 932ab11dd12e26f0d306df8525abf39e94d8ec93 (diff) | |
parent | e5a71e3f95ed739a92479f93fe481cf97ca11e58 (diff) |
Merge pull request #10705 from djrm/pr_gizmo_icons
Added missing gizmo icons and fixed ugly looking gizmo icons.
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index a527701563..aa2b8913df 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -93,8 +93,11 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true) { Ref<ImageTexture> icon = memnew(ImageTexture); Ref<Image> img = memnew(Image); + // dumb gizmo check + bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo"); + ImageLoaderSVG::create_image_from_string(img, dark_theme ? editor_icons_sources[p_index] : editor_icons_sources_dark[p_index], EDSCALE, true); - if ((EDSCALE - (float)((int)EDSCALE)) > 0.0) + if ((EDSCALE - (float)((int)EDSCALE)) > 0.0 || is_gizmo) icon->create_from_image(img); // in this case filter really helps else icon->create_from_image(img, 0); |