Feature Request: Expand tooltip with GIF image
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Feature Request: Expand tooltip with GIF image
Hi!
I have been thinking about placing gif images as an extension to the icons tooltips.
The idea is that the basic tooltip behaves as it does now, but if you hang the cursor there for a bit longer it will expand to show an animated gif with a visual explanation of the tool.
IMHO this could be a good solution when icon image is not enough to define a tool, being the major drawback a bit longer workbench load time.
I have tried to retrieve the position of the icons within the FreeCAD main window, to draw a frameless widget over them containing the gif image...
...an ugly hack with no success.
What do you think?
Javier.
I have been thinking about placing gif images as an extension to the icons tooltips.
The idea is that the basic tooltip behaves as it does now, but if you hang the cursor there for a bit longer it will expand to show an animated gif with a visual explanation of the tool.
IMHO this could be a good solution when icon image is not enough to define a tool, being the major drawback a bit longer workbench load time.
I have tried to retrieve the position of the icons within the FreeCAD main window, to draw a frameless widget over them containing the gif image...
...an ugly hack with no success.
What do you think?
Javier.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
Re: Feature Request: Expand tooltip with GIF image
I played with an extended help tooltip one time (the idea was to use the wiki page in s simplified and small widget as tooltip, which is anvigatable). Never made it very far, but I was able to set a custom widget as tooltip widget. I don't remember the implementation details, but if interested I could look it up. It was in c++, but most likely also works in python.
EDIT: ah no my code only worked with c++. Adding a custom widget to every tool in FreeCAD from python will be hard as the action system is not really well exposed. But of course one could provide the c++ code to add a python widget. Here the code I used in src/Gui/Action.cpp:
EDIT: ah no my code only worked with c++. Adding a custom widget to every tool in FreeCAD from python will be hard as the action system is not really well exposed. But of course one could provide the c++ code to add a python widget. Here the code I used in src/Gui/Action.cpp:
Code: Select all
@@ -82,6 +83,10 @@ Action::~Action()
void Action::addTo(QWidget *w)
{
w->addAction(_action);
+
+ //if the action is added to a toolbar we can show the extended tooltips
+ if(QToolBar *tb = qobject_cast<QToolBar*>(w))
+ tb->widgetForAction(_action)->installEventFilter(this);
}
/**
@@ -196,6 +201,25 @@ void Action::setMenuRole(QAction::MenuRole menuRole)
_action->setMenuRole(menuRole);
}
+bool Action::eventFilter(QObject* o, QEvent* e)
+{
+ if(e->type() == QEvent::ToolTip) {
+
+ QToolTip::hideText();
+ if(!ExtendedActionTooltip()->isVisible() || this != ExtendedActionTooltip()->displayedAction()) {
+ QHelpEvent* he = static_cast<QHelpEvent*>(e);
+ ExtendedActionTooltip()->setGeometry(QRect(he->globalPos()+QPoint(5,15), ExtendedActionTooltip()->size()));
+ ExtendedActionTooltip()->show(this, true);
+ }
+ return true;
+ }
+ else if (e->type() == QEvent::Leave) {
+ ExtendedActionTooltip()->show(this, false);
+ };
+
+ return false;
+}
+
Re: Feature Request: Expand tooltip with GIF image
Currently user has to have help files installed, press on a button and go over individual tool and click on it to open help. To figure this out and set up takes time and understanding. And there is a problem of incomplete documentation. If this could be improved in the future that would be good.
If we would expand tooltip with GIF image what i do imagine could remain the issue.
If we would expand tooltip with GIF image what i do imagine could remain the issue.
- Would we include the GIF image database in standard FreeCAD install packages? If not i guess a lot of users wouldn't use it.
- And about the GIF image documentation itself. I guess it would take substantial effort to make it?
Re: Feature Request: Expand tooltip with GIF image
What i will probably explore when creating documentation for TabBar is this:
http://tiddlywiki.com/
FreeCAD already used it a few years back. I guess it could be displayed in sidebar "in mini browser mode". The challenge would therefore probably be on how to change the page after individual tool is activated. That is if documentation is available for the tool. And from FreeCAD perspective translations could represent issues. From TabBar perspective i will probably be able to "hard code" some links and that will be it. But i haven’t done any investigation about using this approach up to this point yet!
http://tiddlywiki.com/
FreeCAD already used it a few years back. I guess it could be displayed in sidebar "in mini browser mode". The challenge would therefore probably be on how to change the page after individual tool is activated. That is if documentation is available for the tool. And from FreeCAD perspective translations could represent issues. From TabBar perspective i will probably be able to "hard code" some links and that will be it. But i haven’t done any investigation about using this approach up to this point yet!
Re: Feature Request: Expand tooltip with GIF image
Thanks for your replies
@ickby
Thanks for pointing out where the tooltip its located. I'll try to do some investigation there, but my c++ skills are below zero
@triplus
My idea about the gift is to keep them as simple as possible: an image with no text.
For example:
Part design extrusion
Part design revolution
The only need to modify those gif images is when the tool behavior changes (something that rarely happens), so the documentation problem is kept unaltered.
@ickby
Thanks for pointing out where the tooltip its located. I'll try to do some investigation there, but my c++ skills are below zero
@triplus
My idea about the gift is to keep them as simple as possible: an image with no text.
For example:
Part design extrusion
Part design revolution
The only need to modify those gif images is when the tool behavior changes (something that rarely happens), so the documentation problem is kept unaltered.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
Re: Feature Request: Expand tooltip with GIF image
And no language translation required either.JMG wrote:The only need to modify those gif images is when the tool behavior changes (something that rarely happens), so the documentation problem is kept unaltered.
I like it. But the Part Design extrusion gif is too fast!
Edit: maybe there should be a setting in the preferences to enable/disable the animated tooltips... One may tire of seeing them when the mouse pointer passes over a tool.
Re: Feature Request: Expand tooltip with GIF image
I can see how informative an animated gif can be, but they are generally so annoying! On my phone or Firefox on Ubuntu you don't seem to have any obvious way to stop them moving or control their speed, so they often move to fast, can't be paused, and are very distracting if they are something you don't want to see again or ever.JMG wrote:example:
Part design extrusion
I can see how useful it could be for a very new newbie...but this could become annoying very quickly. I think this is a case of trying to make FreeCAD for newbies which is the wrong thing to do, they should read the wiki etc.
Re: Feature Request: Expand tooltip with GIF image
This feature was very useful when doing my "Final Year Project" (PFC in Spain), it was done with Autodesk Revit.
Estudié ingeniería técnica industrial en España y sólo me ha servido para estar en el paro, no me contratan porque no tengo experiencia, y no tengo experiencia porque no me contratan. No debí estudiar esa carrera.
Re: Feature Request: Expand tooltip with GIF image
That was my first reaction as well, but after watching it for a while I think the speed might be perfect. Imagine hovering over an icon and have to wait 5 seconds for the information to be revealed. It could get annoying fast. It should also be tecknicaly possible to control the speed by swapping out the frame delay for each frame as it is read from disk. That way one might have a animation speed slider or something to that effect.NormandC wrote:I like it. But the Part Design extrusion gif is too fast!
I do not understand this stance/logic. Stuff is almost never this black and white, at least when you have almost infinitely more prospective new users, than actual users. I think a more productive way of looking at the balance between usability for new and experienced users is, to be extremely vigilant when usability features soly aimed at new users is hampering productivity or quality of FreeCAD for seasoned users. And not to forget, seasoned users could be stuck in the rott, and not seeing the tree for the forest.jmaustpc wrote:I think this is a case of trying to make FreeCAD for newbies which is the wrong thing to do, they should read the wiki etc.
I think this is an excellent idea, that should be given room and ideas to grow and develop. If it evolves to its potential, I do not think it would be difficult to come up with a technical solution, so that seasoned users only see this once, or maybe ever(plugin?).
Need help? Feel free to ask, but please read the guidelines first
Re: Feature Request: Expand tooltip with GIF image
This is something new and is to be coded, and the good thing is that we can do it the way we want. I know that this gif images get annoying when you know what are you doing (happens to me with modern CAD tools), but because we know this and we need to code them, I think that its easy to place a small check-box or radio button in the preferences dialog.I can see how informative an animated gif can be, but they are generally so annoying! On my phone or Firefox on Ubuntu you don't seem to have any obvious way to stop them moving or control their speed, so they often move to fast, can't be paused, and are very distracting if they are something you don't want to see again or ever.
I can see how useful it could be for a very new newbie...but this could become annoying very quickly. I think this is a case of trying to make FreeCAD for newbies which is the wrong thing to do, they should read the wiki etc.
Lowers a bit the learning curve for newbies, makes you check a small box to disable them and have the same FreeCAD as always.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly