selection-animation#2187
Conversation
cameronwhite
left a comment
There was a problem hiding this comment.
I agree this is a reasonable option to have 👍 , but I think it needs to be exposed somewhere in the UI otherwise it's never going to be discovered by anyone else
This would be a good case for adding a general preferences dialog which has been discussed in some other tickets.
Let me know if you're interested in working on that, or else we can file it as a separate ticket for the future
|
|
||
| // Timer for selection outline animation | ||
| selection_animation_timer_id = GLib.Functions.TimeoutAdd (GLib.Constants.PRIORITY_DEFAULT, 80, SelectionAnimationTick); | ||
| bool selectionAnimation = PintaCore.Settings.GetSetting ( "selection-animation", true); |
There was a problem hiding this comment.
A couple minor suggestions here:
- The names of setting keys should go into
SettingNames.csas constants in case they're used in multiple places - It might work better to check the setting in the
SelectionAnimationTickfunction, that way changes to the setting (once a UI option is added) are picked up immediately
|
I added an entry in the File menu, but I made it simple, and I don't need this in SelectionAnimationTick. I could add a live-reload option, but that fits more naturally with a libadwaita preferences dialog than with this simple GTK one. Anyway, I converted it to a draft, and I am happy with "edits by maintainers". |
Removing the “marching ants” selection animation significantly reduces CPU usage on low-power devices such as Raspberry Pi.
No additional guard is needed when removing the GLib timer source, since GLib.Source.Remove(0) is defined as a safe no-op:
GLib.Source.Remove(selection_animation_timer_id);A UI toggle was considered, but there is currently no clear place in the existing UI to expose a global preference of this type:
Selection tools (Rectangle / Ellipse / Lasso / Magic Wand) → too fragmented and tool-specific
Edit menu → closest conceptual match (selection-related operations already live there)
View menu → would be the most appropriate conceptually, but does not currently exist
For now, this is implemented as a configuration-level option.