feat: toggle text outline in inverted color with Alt - #574
Conversation
Tapping Alt while editing text toggles an outline drawn in the inverted text color (255 - channel per RGB, alpha kept). The outline is rendered by stroking each line with the inverted color underneath the fill, so it forms a border around the glyphs, and it is preserved when the text is committed. To avoid interfering with Alt-based combos (e.g. Ctrl+Alt+Arrow to move the text) and key auto-repeat, the toggle only fires on a genuine Alt tap: press then release with no other key pressed in between.
|
Looks good, nice addition. We may revamp the way tool styles, secondary modes, tool specific actions etc are accessed in the future, ideally even allow configuring keybindings for this. Will definitely be after #555. In order to allow that, it'd be nice if you could flag the Alt toggle in the README as Experimental. Thanks :) I also have a bonus idea, feel free to reject it, though, we can always do that later. 😉 How about there are different outline modes: and hitting alt cycles through them?
|
The way tool styles, secondary modes and tool-specific actions are accessed may be revamped (ideally with configurable keybindings) after issue Satty-org#555, so mark this binding as experimental for now.
Replace the boolean outline flag with an OutlineMode enum that the Alt tap cycles through: None -> Inverted -> Contrast -> None. Inverted keeps the previous behaviour (per-channel 255 - value); Contrast picks black or white based on the text color's perceived luminance (YIQ). Co-authored idea by the maintainer.
|
Done! My goal was to keep everything as simple and concise as possible, without any extra interface buttons or unnecessary settings, so that the app would remain minimalistic and straightforward :Ъ |
|
lgtm, thanks for the PR :) |
Closes #573
What
Adds an optional outline to the text tool. While editing text, tapping Alt toggles an outline drawn in the inverted text color (255 - channel per RGB, alpha preserved). The outline is preserved when the text is committed.
Adds an optional outline to the text tool. While editing text, tapping Alt toggles an outline drawn in the inverted text color (255 - channel per RGB, alpha preserved). The outline is preserved when the text is committed.
2026-07-04.13-33-24.mp4
Why
Text can blend into the background and become unreadable. An inverted-color outline always contrasts with the fill, keeping annotations legible over any background, with no new color setting to configure.
How
Docs
Testing
Notes
No new dependencies