feat: add tab stop to enable right-aligned content #463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another (hopefully) quick win. This adds a single right-aligned tabstop to the menu item title text, which allows for images and text to be anchored on the right by separating them with the
\tcharacter.Example screenshot:
I've picked a default tab stop of 150 points, as I think this is reasonable enough as a first pass. However, I could add more tab stops for potentially wider menus. My original thought was to allow configurable tabstops through params, but I'm not sure what the format should look like as you'd need both a number for the location and an alignment string. I'm happy to follow up on this with improvements if there's a concrete approach. Either way, I think some level of default is useful.
Caveat: it doesn't look quite so good when there are submenus or badges, but it's great for submenus that don't have those things.