This MR adds a small hint to tooltips which can be expanded. Pressing Shift will show the expanded help in a widget that isn't hidden when the mouse moves. This is necessary so we can have clickable links there which will allow us to refer users to the manual, community wiki etc. which makes these resources more readily available and helps us avoid duplicating their work. It also allows us to keep the tooltips a reasonable length.
If a widget provides an expanded tooltip but no normal tooltip, not even a hint is shown when hovering the widget. This way no hovering text will appear unless it was explicitly set by a developer. At the same time this lets us keep Whats This available for all areas.
An exception to this are QMenus. QActions have their text as their tooltip by default so to avoid having a tooltip that is identical to the action text already visible, only the hint for the expanded tooltip is shown for them.
This MR also adds the shortcut to tooltips of
Having tooltips be expandable lets us minimise the risk of tooltips covering currently used areas of an application by accident.
It currently doesn't seem to work with Okular, Kate, Konsole.nvm, this worked all along. I tested it wrong.
Have some sort of mechanism so applications can opt out of using these tooltip changes.
Have some sort of mechanism so singular widgets can still handle tooltips themselves.
It should probably respect the setting in Workspace Behaviour which disables tooltips.nvm, that setting is only meant to apply to the "Plasma panel or [to] the desktop". Even if we wanted to change it so it applies to KDE applications as well, that should be done using
QStyle::SH_ToolTip_WakeUpDelayin a style related framework so not in this MR or framework.
- Build kxmlgui with this MR
- Source it like usual: https://community.kde.org/Get_Involved/development#Frameworks
- Start an application. No changes to the application are necessary. This should work for all applications that inherit from
KMainWindow. For applications that don't have What's This texts, the only visible changes should be the added shortcut information for
QToolButtons and tooltips showing up in menus if they were explicitly set.
Related discussion: https://phabricator.kde.org/T9986