-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Show images in a tooltip when hovering them in the FileSystem dock #175
Show images in a tooltip when hovering them in the FileSystem dock #175
Comments
This will require implementing a custom tooltip system, as the built-in tooltip can only display simple unformatted text. EditorHelpBit can embed a RichTextLabel (which can technically embed an This tooltip could also display the image size and format (compression mode) below the image preview. |
We have one actually. |
Here is the code that needs modifying: if file is Image then
set_custom_tooltip(new ImageTexture().from_data(file.data))
else
set_tooltip(file.name)
end @define-private-public feel free to put that in OP. |
@Jummit One will most likely have to embed the image in a TextureRect node, which will require a bit of additional setup. |
|
Two other things I'd like to propose:
|
Related to godotengine/godot#30171 btw EDIT: IMO this could be expanded to other information too, like file size or image size. So you can e.g. easily check image dimensions without needing to open it in the inspector. Here's a mockup stolen from Windows Explorer: |
Filesystem
panel, when mousing over an image, show the image in the tooltip
Describe the project you are working on:
I'm currently running through the docs to learn how to use Godot. I'm planning on doing some Game Jams with it, and resurrecting some older projects.
Describe the problem or limitation you are having in your project:
Not a limitation, but a usability enhancement for Godot. Right now when trying to identify images in the
FileSystem
panel, all you can rely on is the name of the file, or the tiny preview icon.Describe how this feature / enhancement will help you overcome this problem or limitation:
Right now when mousing over an image in the
FileSystem
panel, it will only show the filename in the tooltip. I think it would be more useful if the actual image (or a preview of it) showed up in the tooltip. I've seen this done in all sorts of applications.Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
I think this is simple enough to not need a mockup creation, but I can provide one if requested.
Describe implementation detail for your proposal (in code), if possible:
Pseudocode provided by @Jummit:
I do think that there should be a hard limit on the tooltip size. e.g. 256x256 pixels max. Anything larger should be scaled down.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
N/A
Is there a reason why this should be core and not an add-on in the asset library?:
Very nice (and hopefully simple) usability enhancement.
The text was updated successfully, but these errors were encountered: