You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
As discussed in #1404, having the keyboard shortcut appear on the button tooltip helps users to discover (or remind of) new shortcuts. We already do this for tools, so having this on the other panels (such as Layers and History) is a good idea.
Adding the Shortcut key: ... line to match how the tool buttons behave sounds good to me. I'd skip adding the Action: ... line since that seems confusing for most users who won't know what it means
Re: the discussion in #1404, my original thinking was that CreateToolBarItem() could append the Shortcut key: ... text to the label to build the tooltip, if the command doesn't have an explicit tooltip (I'm not sure offhand which actions actually set a tooltip explicitly).
So that avoids the construction issue and it just boils down to passing the Gtk.Application instance into CreateToolbarItem().
But I think your suggestion of having Command take the Gtk.Application and an optional shortcut seems like it would be a cleaner API.
But I think your suggestion of having Command take the Gtk.Application and an optional shortcut seems like it would be a cleaner API.
I just tried passing Gtk.Application to Command. We would end up having to pass it from the static constructor (⚠️) of PintaCore:
PintaCore creates ActionManager
ActionManager creates action bundles like EditActions, ViewActions...
Action bundles create Command objects
What about passing just the shortcut info for now, and then reading it both at the call sites of AddAccelActionand the method that creates the toolbar items (CreateToolbarItem)?
Activity
pedropaulosuzuki commentedon May 3, 2025
Maybe we could even have an additional line for displaying action names (mainly for scripting), like Blender does. Might be too specific tho.
This would only require adding
"\n\nAction: " + action.Nameto CreateToolBarItem(), so this addition wouldn't be that difficult.cameronwhite commentedon May 5, 2025
Adding the
Shortcut key: ...line to match how the tool buttons behave sounds good to me. I'd skip adding theAction: ...line since that seems confusing for most users who won't know what it meansRe: the discussion in #1404, my original thinking was that
CreateToolBarItem()could append theShortcut key: ...text to the label to build the tooltip, if the command doesn't have an explicit tooltip (I'm not sure offhand which actions actually set a tooltip explicitly).So that avoids the construction issue and it just boils down to passing the Gtk.Application instance into
CreateToolbarItem().But I think your suggestion of having
Commandtake the Gtk.Application and an optional shortcut seems like it would be a cleaner API.Lehonti commentedon May 7, 2025
I just tried passing⚠️ ) of
Gtk.ApplicationtoCommand. We would end up having to pass it from the static constructor (PintaCore:PintaCorecreatesActionManagerActionManagercreates action bundles likeEditActions,ViewActions...CommandobjectsWhat about passing just the shortcut info for now, and then reading it both at the call sites of
AddAccelActionand the method that creates the toolbar items (CreateToolbarItem)?cameronwhite commentedon May 8, 2025
Thanks for looking into it! That is indeed a big problem, so I think your suggestion of just storing the shortcut info sounds good for now