Add max width to entity icons in tree
Description
Sets max width of tree item icons for entities in tree. This allows using larger scale svg icons without having to scale them just to use them in Pandora.
Addressed issues
- closes #109
This basically fixes it, but probably needs work for editor scaling
Okay, this actually seems to work. Just multiplies the editor scale by 16 to calculate the icon scale. Tested with 75% scale and 125%
@andersmmg unfortunately, EditorInterface needs to be passed through manually, as it would break compatibility otherwise with Godot 4.1 and 4.0 (see failures)
@andersmmg any update on this?
Sorry, haven't been working on this kind of stuff in a while. I think this should at least fix it to be more backwards compatible?
Seems to fail still:
ERROR: The object does not have any 'meta' values with the key 'PandoraEditorPlugin'.
at: get_meta (core/object/object.cpp:924)
See: https://github.com/bitbrain/pandora/actions/runs/9361941184/job/25974226743?pr=165
That's odd, it works on my end. The meta value is set in "_enter_tree" of the plugin, so I'm not sure why a part of the plugin thinks it's not set. It's also odd that the issue doesn't show up until partway through the unit tests, I couldn't find anything specific about why it would fail when running the test_create_reference_array test specifically
This may work, and hopefully will pass the unit tests. I've been unable to run the tests locally, gdunit won't work for me
Hey, thanks for this!