mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Apply fix_alpha_edges for both theme icons and font glyphs.
Only apply fix_alpha_edges for SVG glyphs. Allow modulate for svg glyphs.
This commit is contained in:
parent
96cdbbe5bd
commit
70a8421c30
5 changed files with 38 additions and 6 deletions
|
|
@ -91,6 +91,8 @@ static Ref<ImageTexture> generate_icon(int p_index) {
|
|||
|
||||
Error err = ImageLoaderSVG::create_image_from_string(img, default_theme_icons_sources[p_index], scale, upsample, HashMap<Color, Color>());
|
||||
ERR_FAIL_COND_V_MSG(err != OK, Ref<ImageTexture>(), "Failed generating icon, unsupported or invalid SVG data in default theme.");
|
||||
|
||||
img->fix_alpha_edges();
|
||||
#else
|
||||
// If the SVG module is disabled, we can't really display the UI well, but at least we won't crash.
|
||||
// 16 pixels is used as it's the most common base size for Godot icons.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue