Bug 432070 - Toolbox tooltips of Path/Bezier/Polygon/Polyline tools do not reflect customized Canvas Shortcuts Modifiers
Summary: Toolbox tooltips of Path/Bezier/Polygon/Polyline tools do not reflect custom...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Vector (other bugs)
Version First Reported In: 4.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-01-25 03:06 UTC by Tyson Tan
Modified: 2022-05-31 12:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2021-01-25 03:06:04 UTC
Toolbox tooltips of many tools: Path/Bezier/Polygon/Polyline/Move/Text tools do not reflect modified Canvas Shortcuts. These are hardcoded in translations. 

Although reported to me many times in the past, I was unable to reproduce it -- I always use the default settings -- not until last week when a user who was experienced enough to point out they were using PS/SAI compatible shortcut profiles. 

Although we can remove them altogether, they are kinda important tips that without which the tools are crippled. I wonder if we can make these tooltips aware of the current Canvas Shortcuts settings.

The list of hardcoded shortcuts with modifiers in Krita:

Drag to move point. Shift click to change point type.
#: libs/flake/tools/KoPathTool.cpp:713

Bezier Curve Tool: Shift-mouseclick ends the curve.
#: plugins/tools/basictools/kis_tool_path.h:91

Bezier Curve Tool. Shift-mouseclick or double-click ends the curve.
#: plugins/tools/basictools/KisToolPath.action:9

Polygon Tool: Shift-mouseclick ends the polygon.
#: plugins/tools/tool_polygon/kis_tool_polygon.h:53

Polygon Tool. Shift-mouseclick ends the polygon.
#: plugins/tools/tool_polygon/KisToolPolygon.action:9

Polyline Tool: Shift-mouseclick ends the polyline.
#: plugins/tools/tool_polyline/kis_tool_polyline.h:54

Polyline Tool. Shift-mouseclick ends the polyline.
#: plugins/tools/tool_polyline/KisToolPolyline.action:9

Move the layer that you have currently selected in the layerbox with its masks. Shortcut: ctrl-click.
#: plugins/tools/basictools/wdgmovetool.ui:29

Move the group containing the first layer that contains visible content. Shortcut: ctrl-shift-click.
#: plugins/tools/basictools/wdgmovetool.ui:55

<html><head/><body><p><span style=" font-weight:600;">Clone Brush:</span></p><p>Select the source point from the current layer with Ctrl-click. Use Ctrl+Alt-click to select a source from the previously picked layer.</p></body></html>
#: plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui:95

Ctrl+click to go to link 
#: plugins/flake/textshape/TextTool.cpp:560

Ctrl+click to go to the note 
#: plugins/flake/textshape/TextTool.cpp:567

Ctrl+click to go to the note reference
#: plugins/flake/textshape/TextTool.cpp:573
Comment 1 Lynx3d 2022-05-31 09:17:46 UTC
Git commit 08fb201ef09190cc4abc14cfe51cabc76580dbb0 by Mathias Wein.
Committed on 31/05/2022 at 08:36.
Pushed by mwein into branch 'master'.

Make Tool Box update tooltips on shortcut changes

For this to work, KoToolBoxDocker was made a KisMainWindowObserver.
And the main window has to create tool actions before passing the
view manager to the observers.

This allows the docker to fetch the actual QAction objects responding
to the shortcuts, and synchronize with their tooltip.

Maybe KoToolBox should now just use KisHighlightedToolButton instead of
yet another custom button class.
Related: bug 425654

M  +5    -5    libs/ui/KisMainWindow.cpp
M  +17   -0    libs/ui/toolbox/KoToolBox.cpp
M  +30   -12   libs/ui/toolbox/KoToolBoxButton.cpp
M  +4    -1    libs/ui/toolbox/KoToolBoxButton_p.h
M  +5    -0    libs/ui/toolbox/KoToolBoxDocker.cpp
M  +4    -2    libs/ui/toolbox/KoToolBoxDocker_p.h
M  +2    -0    libs/ui/toolbox/KoToolBox_p.h

https://invent.kde.org/graphics/krita/commit/08fb201ef09190cc4abc14cfe51cabc76580dbb0
Comment 2 Tyson Tan 2022-05-31 12:56:07 UTC
Thank you, Lynx!