godotengine / godotengine/godot
Custom script icons render too small on Retina display
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
v4.3.stable.official [77dcf97d8]
### System information
Godot v4.3.stable - macOS 14.6.1 - GLES3 (Compatibility) - Intel(R) UHD Graphics 617 - Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz (4 Threads)
### Issue description
When setting a custom `@icon` on a script, the icon renders smaller than expected in the Scene Tree. The icon preview in the FileSystem renders at the correct size.
I'm using a MacBook Air with a high DPI / Retina display:
Screen Width: 1440 pixels
Screen Height: 900 pixels
DPR (Device Pixel Ratio): 2
### Steps to reproduce
- Create a new script
- Add a custom `@icon` pointed at an asset in the FileSystem (.png and .svg both tested)
```
@icon ("res://assets/icons/icon_save.svg")
extends Node2D
class_name SaveDataResource
```
- Observe icon in FileSystem pane at incorrect size
### Minimal reproduction project (MRP)
[customiconsizeissue.zip](https://github.com/user-attachments/files/16740466/customiconsizeissue.zip)
Contributor guide
Assessment
This issue has not been assessed yet.