diff --git a/Cargo.lock b/Cargo.lock index c2d7d6ef..ed131422 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" +checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" dependencies = [ "enumn", "serde", @@ -36,15 +36,14 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", "once_cell", "serde", "version_check", - "zerocopy", ] [[package]] @@ -242,7 +241,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", ] [[package]] @@ -629,7 +628,8 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af" dependencies = [ "bytemuck", "serde", @@ -638,7 +638,8 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d9efede6c8905d3fc51a5ec9a506d4da4011bbcae0253d0304580fe40af3f5" dependencies = [ "bytemuck", "cocoa", @@ -670,7 +671,8 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7" dependencies = [ "accesskit", "ahash", @@ -684,7 +686,8 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c15479a96d9fadccf5dac690bdc6373b97b8e1c0dd28367058f25a5298da0195" dependencies = [ "arboard", "egui", @@ -700,7 +703,8 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6726c08798822280038bbad2e32f4fc3cbed800cd51c6e34e99cd2d60cc1bc" dependencies = [ "bytemuck", "egui", @@ -720,7 +724,8 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0" dependencies = [ "bytemuck", "serde", @@ -734,7 +739,7 @@ checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", ] [[package]] @@ -753,7 +758,8 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e" dependencies = [ "ab_glyph", "ahash", @@ -1698,9 +1704,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -1954,7 +1960,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", ] [[package]] @@ -2064,9 +2070,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -2138,7 +2144,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", ] [[package]] @@ -2338,7 +2344,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", "wasm-bindgen-shared", ] @@ -2372,7 +2378,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2827,26 +2833,6 @@ version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" -[[package]] -name = "zerocopy" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "zstd" version = "0.12.3+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index a6257a53..90ee2414 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,5 +3,3 @@ resolver = "2" members = ["puffin", "puffin_egui", "puffin_http", "puffin_viewer"] [patch.crates-io] -eframe = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 -egui = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 diff --git a/puffin_egui/examples/eframe.rs b/puffin_egui/examples/eframe.rs index aceeb4d8..7fa80643 100644 --- a/puffin_egui/examples/eframe.rs +++ b/puffin_egui/examples/eframe.rs @@ -17,13 +17,13 @@ pub struct ExampleApp { } impl eframe::App for ExampleApp { - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { puffin::profile_function!(); puffin::GlobalProfiler::lock().new_frame(); // call once per frame! egui::CentralPanel::default().show(ctx, |ui| { if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); + frame.close() } }); diff --git a/puffin_viewer/src/lib.rs b/puffin_viewer/src/lib.rs index ec0b9196..f2525dd2 100644 --- a/puffin_viewer/src/lib.rs +++ b/puffin_viewer/src/lib.rs @@ -218,7 +218,7 @@ impl PuffinViewer { } #[cfg(not(target_arch = "wasm32"))] - fn ui_menu_bar(&mut self, ctx: &egui::Context) { + fn ui_menu_bar(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { if ctx.input(|i| i.modifiers.command && i.key_pressed(egui::Key::O)) { self.open_dialog(); } @@ -242,7 +242,7 @@ impl PuffinViewer { } if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); + frame.close(); } }); ui.menu_button("View", |ui| { @@ -295,7 +295,7 @@ impl eframe::App for PuffinViewer { #[cfg(not(target_arch = "wasm32"))] { - self.ui_menu_bar(ctx); + self.ui_menu_bar(ctx, _frame); } #[cfg(target_arch = "wasm32")] diff --git a/puffin_viewer/src/main.rs b/puffin_viewer/src/main.rs index 49c7a3c9..71ba819f 100644 --- a/puffin_viewer/src/main.rs +++ b/puffin_viewer/src/main.rs @@ -55,12 +55,12 @@ fn main() { Source::Http(puffin_http::Client::new(opt.url)) }; - let icon = eframe::icon_data::from_png_bytes(include_bytes!("../icon.png")).unwrap(); let native_options = eframe::NativeOptions { - viewport: eframe::egui::ViewportBuilder::default() - .with_app_id("puffin_viewer") - .with_drag_and_drop(true) - .with_window_icon(icon), + app_id: Some("puffin_viewer".to_owned()), + icon_data: Some( + eframe::IconData::try_from_png_bytes(include_bytes!("../icon.png")).unwrap(), + ), + drag_and_drop_support: true, ..Default::default() };