Add option to customize the flash on button mouse event #24
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Tachikoma.jl#24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi @kahliburke !
Currently, the flash decoration for the button mouse click event is fixed. My suggestion is to allow the user to easily configure it. My proposal is to add a new field that is a function with this signature:
and it should provide the style for each remaining frame.
If you approve this design, I can submit the PR.
I will take a look, thank you.
@ronisbr The design looks good —
flash_style(flash_remaining::Int)::Stylefits naturally into the existingButtonStylestruct. Please go ahead and submit a PR.One small thing to consider: the flash duration is currently hardcoded to 8 frames (in
handle_key!andhandle_mouse!). You may want to make that configurable too (e.g. aflash_frames::Intfield inButtonStyle), since a custom style function might want a longer or shorter animation. Up to you whether to include that in the same PR or leave it for later.This will target the upcoming 2.0 release.