You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the original editor icons for my plugin and merge two icons together to present success or error state.
On my merge method I have a check to merge only images with the same image size, and it is failing only on macOS
Steps to reproduce
create a plugin and put this code
@tool
extends EditorPlugin
func _enter_tree() -> void:
var icon_a := EditorInterface.get_base_control().get_theme_icon("CSharpScript", "EditorIcons")
var icon_b := EditorInterface.get_base_control().get_theme_icon("StatusSuccess", "EditorIcons")
prints("check icon size", icon_a.get_height(), icon_b.get_height() )
func _exit_tree() -> void:
# Clean-up of the plugin goes here.
pass
on Windows the icon size is 16 for both icons and on macOS it is different 16 vs 32 px
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
MikeSchulze
changed the title
Editor icon size are different on macOS image 16px vs 32px
Editor icon size are different on macOS (image 16px vs 32px)
Jun 1, 2024
This is likely due to editor scale which is OS dependent, and different icons are scaled differently, these are two different types of icons, one is a type icon and one is a status icon, so they might be processed differently
Icon size depends on the editor scale setting, so you need to use Image.resize() if you want to guarantee the icons will be the same size no matter the editor scale.
Most macOS devices have hiDPI displays now, hence the 2x scale factor by default.
Tested versions
v4.2.2.stable.official [15073af]
System information
macOS
Issue description
I use the original editor icons for my plugin and merge two icons together to present success or error state.
On my merge method I have a check to merge only images with the same image size, and it is failing only on macOS
Steps to reproduce
on Windows the icon size is 16 for both icons and on macOS it is different 16 vs 32 px
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: