Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom node icons are not resized with higher display scaling values (doesn't apply to class_name-provided nodes) #20197

Closed
Calinou opened this issue Jul 16, 2018 · 12 comments

Comments

@Calinou
Copy link
Member

Calinou commented Jul 16, 2018

Godot version: Git f8417ac

OS/device including version: Fedora 28

Issue description: Custom nodes' icons will always be drawn at the default scale, even when using a larger editor scale. This occurs even when a SVG icon is used:

hidpi_plugin_icon

Steps to reproduce: Create or import a plugin that uses a PNG or SVG icon.

Minimal reproduction project: https://github.com/Calinou/godot-procedural-crosshair

@MatiasVME
Copy link

I can't see my icon directly, but I can see it in the add nodes part.

I'am using aeddb30

screenshot_20181030_132022

screenshot_20181030_132040

@Calinou
Copy link
Member Author

Calinou commented Oct 30, 2018

@MatiasVME That's unrelated to the issue I'm reporting here.

@Calinou
Copy link
Member Author

Calinou commented Oct 23, 2019

This doesn't seem to be fixed by #33019, as it only fixes the issue for custom types declared using class_name. Still, as custom types declared by editor plugins might be deprecated in the future, fixing this is low-priority.

image

@KoBeWi
Copy link
Member

KoBeWi commented Nov 3, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
(I tried changing my editor scale, but it doesn't seem to do anything...)

@Calinou
Copy link
Member Author

Calinou commented Nov 4, 2020

I can't reproduce this issue with this project on Godot 3.2.3 and 3.2.4beta1:

Scene tree dock at 200% scale with blurry custom node icons

The icons are displayed at the correct size but are still blurry, unfortunately. (They're SVGs with a reference size of 16×16 for correct display at 100% scaling.)

Zylann/godot_heightmap_plugin#209 says this can still be reproduced though…

@KoBeWi
Copy link
Member

KoBeWi commented Nov 4, 2020

Ok I was just changing custom_display_scale instead of display_scale. I managed to reproduce the bug in 3.2.3:
image
(the original MRP also has this issue)

@coppolaemilio
Copy link
Member

I have this same issue in my plugin, but it only happens on mac. It works well on windows.

(Notice the Dialogic icon at the top and the relative size on the rest of the icons) Even the custom nodes (the color bars) have icons that are shown smaller on mac.

Windows screenshot @125% display scale
dia-win

Mac screenshot @any display scale:
dialogic-mac-bug

@Calinou Calinou changed the title Custom node icons are not resized with higher display scaling values Custom node icons are not resized with higher display scaling values (doesn't apply to class_name-provided nodes) Oct 6, 2021
@andrejp88
Copy link

The icons are displayed at the correct size but are still blurry, unfortunately.

Calinou, were you able to fix the blurriness? Do you think it's related to this issue, or is it something separate?

Here is a screenshot of the problem. The bottom node is an actual StaticBody2D node, but the top node is a custom class where the icon is set to the StaticBody2D SVG copied to my project folder. Godot 3.5, Linux, editor scale set to 200% (for testing this out).

PNGs don't seem to have this problem, here the top node is using a 32x32 PNG of the icon exported via Inkscape:

image

@Calinou
Copy link
Member Author

Calinou commented Aug 8, 2022

Calinou, were you able to fix the blurriness?

You can set the Svg > Scale import option to 2 in the Import dock for the editor icon. This will rasterize the image as 32×32 instead of 16×16.

@andrejp88
Copy link

Thanks, that didn't work unfortunately, even tried to set the scale to 4 at one point, but it looks exactly the same. I had also tried fiddling with the Filter and Mipmaps flags but nothing seemed to make a difference.

It's not a big deal one way or another, was just curious if someone had already gone down this rabbit hole :D

@coppolaemilio
Copy link
Member

There is a proposal to fix this kind of issues: godotengine/godot-proposals#5034

@dzil123
Copy link
Contributor

dzil123 commented Nov 6, 2022

This appears to be fixed in the crosshair project when the icon.svg has enabled "Scale With Editor Scale" from #64938, should this be closed?

@KoBeWi KoBeWi closed this as completed Nov 6, 2022
@KoBeWi KoBeWi added this to the 4.0 milestone Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants