Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the copy icon with a checkmark after the text is copied from a codeblock #42

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

zeozeozeo
Copy link
Contributor

small ux improvement:

  • Replace the copy icon with a checkmark after the text is copied from a codeblock
  • Change the cursor to a PointingHand when hoving over the copy icon
copy-checkmark.mp4

Copy link
Owner

@lampsitter lampsitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I have wanted to add this for a while. I'm against the pointing hand though (See previous reasonings in egui emilk/egui#3311 (comment)). Use Visuals::interact_cursor instead locally if you want that.

Also changes persistent memory writing logic a bit
to only call `IdTypeMap::get_temp_mut_or_default`
when the icon is clicked and when the mouse leaves
it
@lampsitter lampsitter merged commit 31c13d0 into lampsitter:master Mar 29, 2024
1 check passed
@lampsitter
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants