-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Enhance filesystem dock tooltips #63263
Conversation
The borders of the tooltips for images seem broken. |
What do you mean? |
The left border has a much smaller gap than the rest when hovering images. |
Borders are managed by the default tooltip container, so it doesn't seem like my fault. I could maybe hack it by adding an empty control. |
It would be better if we found the root issue rather than implementing a hack. Still, not a stopper for this PR. |
I'd leave it for later. The PR lays a nice foundation for such additions. |
17cf203
to
1121633
Compare
I am not sure the preview implementation is acceptable as loading a resource can be costly. In that case it's only images, but I think I would have preferred that this PR uses the built in resource preview system. It should even simplify the implementation, as it's fairly easy to use. You can check for uses of |
I tried this TextureRect *tr = memnew(TextureRect);
EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, tr, "set_texture", Variant()); but it doesn't have effect 🤔 |
Ok done. It indeed simplified the code, but I still load the texture to display the dimensions 🙃 (it's not possible otherwise) My idea for possible solution is to add |
Yeah I agree with the fact that |
It doesn't work. When the preview is cached it doesn't even load the texture. I can look into implementing preview metadata, but I don't think it really blocks this PR. |
All welcome the new Godot Operating System overlord. |
Editor PR review meeting: feature is wanted and approved, @KoBeWi wants to improve texture loading first seperately. |
Rebased after #64628. For now this PR still uses the hard-coded approach. I'll look into implementing EditorResourceFileTooltipPlugin. |
Ok I added an API for creating resource tooltips and added a plugin for textures. We can add more plugins later (I have some fun idea for audio files). |
82f6737
to
8a40dc0
Compare
Thanks! |
Closes godotengine/godot-proposals#175
Added this to the tooltips: