itsethra / egui-notify Goto Github PK
View Code? Open in Web Editor NEWNotifications library for egui
License: MIT License
Notifications library for egui
License: MIT License
Hi! It would be nice with a screenshot in the README.md, and perhaps a short line about how this crate compares to https://crates.io/crates/egui-toast
❤️
The crate does not compile on stable because if-let chains
are used. There are 2 errors when trying to compile while depending on the crate.
error[E0658]: `let` expressions in this position are unstable
--> C:\Users\enric\.cargo\registry\src\github.com-1ecc6299db9ec823\egui-notify-0.2.0\src/lib.rs:156:16
|
156 | if let Some((_, d)) = toast.duration.as_mut() && toast.state.idling() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
error[E0658]: `let` expressions in this position are unstable
--> C:\Users\enric\.cargo\registry\src\github.com-1ecc6299db9ec823\egui-notify-0.2.0\src/lib.rs:234:20
|
234 | if let Some(pos) = ctx.input().pointer.press_origin() && screen_cross.contains(pos) && !*held {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
I'd like to be able to click a notification then copy the caption text to my clipboard.
I don't see from the API how to dismiss the notification by dismissing it.
Is there a way to capture that clicking event?
Hello,
I would like to add that one of the reasons I have chosen this crate instead of egui_toasts, is that egui_toasts impl !Send and !Sync for Toasts, whereas this crate does not.
This means that I can move an Arc<Mutex> into a closure and await a response, from, let's say ehttp.
I think you should add this to the descriptor as it is a huge bonus on egui_toast
Hey!
First of all, thank you very much for such a nice library, that I really enjoy using in my project.
It would be awesome if I could hover a mouse on a toast and it could freeze both the timer and the progress bar so I could slowly read the output and once I remove my mouse from the toast it may continue and eventually destroy itself
Hi,
it seems like version 0.15.0
is missing on crates.io
Hi,
Thanks for this crate, it's very easy to implement.
I do have an issue though, when the toast appears, I can stii click through to the widgets that are underneeth. Is there a way to make the toast "opaque" to i don't accedently click the buttons below?
thanks
I encountered the problem of the Toasts being too wide on smaller screens because the default font size is very big
I think it would be nice if ToastOptions included a way to customize font sizes
Another option would be to allow using egui::RichText as a caption instead
Please submit an new version to lib.rs
after follow all steps when i run this project with cargo run this error appear
cargo run
Compiling my-tauri-app v0.1.0 (D:\Testing Repo\my-tauri-app)
error[E0425]: cannot find value toasts
in this scope
--> src\main.rs:6:5
|
6 | toasts.info("Hello world!").set_duration(Duration::from_secs(5));
| ^^^^^^ not found in this scope
error[E0425]: cannot find value toasts
in this scope
--> src\main.rs:8:5
|
8 | toasts.show(ctx);
| ^^^^^^ not found in this scope
error[E0425]: cannot find value ctx
in this scope
--> src\main.rs:8:17
|
8 | toasts.show(ctx);
| ^^^ not found in this scope
warning: unused import: egui_notify::Toasts
--> src\main.rs:1:5
|
1 | use egui_notify::Toasts;
| ^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
For more information about this error, try rustc --explain E0425
.
warning: my-tauri-app
(bin "my-tauri-app") generated 1 warning
error: could not compile my-tauri-app
(bin "my-tauri-app") due to 3 previous errors; 1 warning emitted
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.