-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Support extension icons in ScriptCreateDialog #98914
Support extension icons in ScriptCreateDialog #98914
Conversation
4f8db25
to
bf3441c
Compare
2d42776
to
0a3fc27
Compare
cccc520
to
4f207b1
Compare
@Ivorforce Updated so that theme takes precedence unless it returns the fallback icon, at which point it will ask the extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is two changes in one (resizable language icon, and asking GDExtensions for language icons); normally I'd put them in two PRs or at least two commits, but I think it's fine here.
Implementation looks good to me!
Any easy way to test this? |
@KoBeWi You can install Godot Dart. Prior to this change it will have the default invalid icon and after it will use the included Dart icon. |
I don't know how. I'm not familiar with Dart, the downloaded release has no .gdextension file and I tried following the instructions, but ran into problems. |
@KoBeWi See if this helps: https://youtu.be/4VyS9piW_gM (sorry I probably should have linked it in the original comment). Note, I've also noticed that for some reason the extension sometimes requires an extra reboot after everything is installed. I have no idea why. If you don't want to install Dart (which you will need to run |
Ok I managed to get it working. btw the Actions link in your README points to wrong repo. |
I think it's fine, but the changes outside ScriptCreateDialog are unnecessary. |
Removed the unnecessary additions to |
Needs to be squashed into 1 commit. |
abf90e7
to
40a9c5f
Compare
Done and adjusted the commit comments to be correct. |
Attempt to grab the icon for a script type from the theme first, then ask the extension for the icon.
40a9c5f
to
5da3e81
Compare
Thanks! |
Attempt to grab the icon for a script type from an extension first, before falling back to the theme.
This adds a method to option_button to allow the ScriptCreateDialog to set the max size of an item icon, so that it can set the size from the Editor Theme when reading the icon from extension.
Example from Godot Dart:

Fixes #98800