Add icon in tooltip?

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Add icon in tooltip?

Post by MisterMaker »

So since I am working on the icons, and trying to squeeze as much information as I can into the icons without making them unrecognizable.
I was wondering couldn't we add a 48px (or more) icon too the Tooltip? This way we can keep our screen-space and still read the icons that we cannot recognize.
I think Fusion360 does something similar too this.
Example on how it would look like with my icons:
icon in tooltip.png
icon in tooltip.png (58.54 KiB) Viewed 2414 times
It seems pretty easy to do if I check out this thread:
https://stackoverflow.com/questions/342 ... a-qtooltip
And this video:
https://www.youtube.com/watch?v=X9JD8gKGZ00
But do we have to edit every tooltip then or can it be done smarter?
Edit made a feature request for Link branch:
https://github.com/realthunder/FreeCAD/issues/443
This could also be easily put directly into 0.2 as it uses SVG icons and can be scaled up.
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: Add icon in tooltip?

Post by david69 »

hello MisterMaker
as you are working on icons, do you mind to give a look to this thread?
https://forum.freecadweb.org/viewtopic.php?f=15&t=67909
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Add icon in tooltip?

Post by mario52 »

Hi

here example in a macro Python (Macro_FCTreeView Image )

code:

Code: Select all

        self.PB_Sort_00.setToolTip("<img src=" + self.path + "Macro_FCTreeView_10.png" + " />" + "\n" + 
                                   "Sort by <b>Name</b>")
Image


(if you want to test not forgot download the icon)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Add icon in tooltip?

Post by HakanSeven12 »

What about adding gif to tooltips that show how to use this tool?
User avatar
obelisk79
Veteran
Posts: 1061
Joined: Thu Sep 24, 2020 9:01 pm

Re: Add icon in tooltip?

Post by obelisk79 »

HakanSeven12 wrote: Thu Jun 09, 2022 7:10 am What about adding gif to tooltips that show how to use this tool?
I don't care much about the icons in the tooltips, provided its optional, but animations? no-thanks.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Add icon in tooltip?

Post by adrianinsaval »

HakanSeven12 wrote: Thu Jun 09, 2022 7:10 am What about adding gif to tooltips that show how to use this tool?
would be good for newbies but it is not sustainable without a paid staff doing it and keeping it updated and if we had money to employ people there are far better things to spend it on.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Add icon in tooltip?

Post by chrisb »

obelisk79 wrote: Thu Jun 09, 2022 11:24 am I don't care much about the icons in the tooltips, provided its optional, but animations? no-thanks.
+1, I mean it’s still the tooltips, not a tutorial. And it would either make the distro huge or dependent on an extremely fast internet connection for showing a simple tooltip.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Add icon in tooltip?

Post by MisterMaker »

@mario52 Jup, that is exactly how I imagined it. Only a bit better aligned with the text :)
But the golden tip would be if this can be done automatically or that every tool-tip needs to be edited.

@HakanSeven12 We could link it too icon_tooltip and then someone can choose if he wants a gif or not. Would be nice to have a gif to show picking orders and such.
And yes it is a lot of work, but there are probably more around like me that can't code for word censored but can do animations.
So that is a per-request that it should be setup for animations but the actual animation don't have to be there.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add icon in tooltip?

Post by Kunda1 »

Graphical tooltips could be optionally added via the Addon Manager, potentially. And they could be used in a beginner mode. The graphical tooltips could double as part of help documentation as well.

This would be an enormous effort but, one day at a time we'd potentially get there with enough of us collaborating.

Previous threads: https://forum.freecadweb.org/viewtopic. ... d+tooltips
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply