pandora icon indicating copy to clipboard operation
pandora copied to clipboard

Add max width to entity icons in tree

Open andersmmg opened this issue 2 years ago • 4 comments

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

andersmmg avatar Jan 13 '24 22:01 andersmmg

This basically fixes it, but probably needs work for editor scaling

andersmmg avatar Jan 13 '24 22:01 andersmmg

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 avatar Jan 13 '24 22:01 andersmmg

@andersmmg unfortunately, EditorInterface needs to be passed through manually, as it would break compatibility otherwise with Godot 4.1 and 4.0 (see failures)

bitbrain avatar Jan 13 '24 23:01 bitbrain

@andersmmg any update on this?

bitbrain avatar Apr 18 '24 07:04 bitbrain

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?

andersmmg avatar Jun 04 '24 05:06 andersmmg

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

bitbrain avatar Jun 08 '24 12:06 bitbrain

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

andersmmg avatar Jun 08 '24 20:06 andersmmg

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

andersmmg avatar Jun 17 '24 22:06 andersmmg

Hey, thanks for this!

bitbrain avatar Jun 18 '24 20:06 bitbrain