cargo: Remove gtk-macros dependency
Using the crate is depreacted. Replaced spawn! macro with our own spawn function
This commit is contained in:
parent
ca672552be
commit
8b3cfd000a
8 changed files with 21 additions and 20 deletions
|
|
@ -198,3 +198,10 @@ pub fn contrast_ratio(color1: &gdk::RGBA, color2: &gdk::RGBA) -> f32 {
|
|||
|
||||
(l1 + 0.05) / (l2 + 0.05)
|
||||
}
|
||||
|
||||
pub fn spawn<R: 'static, F: std::future::Future<Output = R> + 'static>(
|
||||
f: F,
|
||||
) -> glib::JoinHandle<R> {
|
||||
let ctx = glib::MainContext::default();
|
||||
ctx.spawn_local(f)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue