Skip to content

Allow displaying toasts in the Top/Bottom middle of the window#41

Open
fpotier wants to merge 4 commits intoItsEthra:masterfrom
fpotier:feat/middle-toasts
Open

Allow displaying toasts in the Top/Bottom middle of the window#41
fpotier wants to merge 4 commits intoItsEthra:masterfrom
fpotier:feat/middle-toasts

Conversation

@fpotier
Copy link
Copy Markdown

@fpotier fpotier commented Apr 2, 2025

No description provided.

@liamaharon
Copy link
Copy Markdown

Thanks @fpotier. Would love to see this merged.

@fpotier
Copy link
Copy Markdown
Author

fpotier commented Sep 29, 2025

Thanks @fpotier. Would love to see this merged.

Me too, but I ended up switching to egui-toast as this repo seems inactive.

@ItsEthra
Copy link
Copy Markdown
Owner

Hey thanks for the pr, sorry I didn't look at it earlier as I'm busy studying.

The animation looks weird since it just reuses the horizontal slide animation, also there is expire line flicker for some reason? If you can rebase and add an animation that looks looks decent with the middle position I can consider merging this.

@fpotier
Copy link
Copy Markdown
Author

fpotier commented Dec 26, 2025

Hey, thanks for the crate/feedback and good luck with your studies!
Here is an updated version of the animations, I'm not sure where the flickering is or if it was just with the previous version
https://github.com/user-attachments/assets/542427b3-0b50-4ce5-ac71-5bd22c2b34a6

@ItsEthra
Copy link
Copy Markdown
Owner

Hey thanks that looks much better, by flickering I meant that the expire line goes between toasts sometimes. I'm not sure but It only seems to happen for toasts in the middle. Here is a frame from the video you attached where you can see it.
image

@fpotier
Copy link
Copy Markdown
Author

fpotier commented Dec 30, 2025

I see, it seems to only happen with TopMiddle.
I'll investigate but it's probably because pos.y is modified after the toast.calc_anchored_rect()

@fpotier
Copy link
Copy Markdown
Author

fpotier commented Jan 7, 2026

Hey thanks that looks much better, by flickering I meant that the expire line goes between toasts sometimes. I'm not sure but It only seems to happen for toasts in the middle. Here is a frame from the video you attached where you can see it. image

My last commit should fix the issue, however I couldn't figure out why in some cases rect.max.y is radically different than rect.min.y +/- toast.height resulting in a diagonal progress bar.

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.

3 participants