From 4f238588962d051827cd0289d3506222354365d2 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 1 Feb 2024 19:46:40 +0100 Subject: [PATCH 1/5] Update winit to 0.29.10 --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af293f56a78..fddb47e7736 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1161,7 +1161,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.0", + "libloading 0.7.4", ] [[package]] @@ -1985,7 +1985,7 @@ dependencies = [ "bitflags 2.4.0", "com", "libc", - "libloading 0.8.0", + "libloading 0.7.4", "thiserror", "widestring", "winapi", @@ -4313,7 +4313,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.0", + "libloading 0.7.4", "log", "metal", "naga", @@ -4584,9 +4584,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" -version = "0.29.7" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd430cd4560ee9c48885a4ef473b609a56796e37b1e18222abee146143f7457" +checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" dependencies = [ "ahash", "android-activity", From 7df3f9e3398557ec37b98801ff332b4aa7e1257a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 1 Feb 2024 19:51:25 +0100 Subject: [PATCH 2/5] Update to puffin 0.19 --- Cargo.lock | 19 ++++++++++--------- Cargo.toml | 3 ++- crates/egui/src/context.rs | 2 +- crates/egui_demo_app/Cargo.toml | 4 ++-- examples/puffin_profiler/Cargo.toml | 4 ++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fddb47e7736..eb6deab15d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1161,7 +1161,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.0", ] [[package]] @@ -1985,7 +1985,7 @@ dependencies = [ "bitflags 2.4.0", "com", "libc", - "libloading 0.7.4", + "libloading 0.8.0", "thiserror", "widestring", "winapi", @@ -2907,15 +2907,15 @@ dependencies = [ [[package]] name = "profiling" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" +checksum = "0f0f7f43585c34e4fdd7497d746bc32e14458cf11c69341cc0587b1d825dde42" [[package]] name = "puffin" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0b84517b2fb755da3a634bc030fcbc7b6337a786aa25a7fb350cdd51ab5e15" +checksum = "b9f76ad4bb049fded4e572df72cbb6381ff5d1f41f85c3a04b56e4eca287a02f" dependencies = [ "anyhow", "bincode", @@ -2929,13 +2929,14 @@ dependencies = [ [[package]] name = "puffin_http" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf8e52cf00569807b02e8089a85e859c00476182730cda9718c94b12cdc31b8" +checksum = "4936c085e48efc86f6d96609dc5086d1d236afe3ec4676f09b157a4f4be83ff6" dependencies = [ "anyhow", "crossbeam-channel", "log", + "parking_lot", "puffin", ] @@ -4313,7 +4314,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.7.4", + "libloading 0.8.0", "log", "metal", "naga", diff --git a/Cargo.toml b/Cargo.toml index 977c1d9a39d..0ed6d93a93e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,8 @@ opt-level = 2 [workspace.dependencies] criterion = { version = "0.5.1", default-features = false } glow = "0.13" -puffin = "0.18" +puffin = "0.19" +puffin_http = "0.16" raw-window-handle = "0.6.0" thiserror = "1.0.37" web-time = "0.2" # Timekeeping for native and web diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 0f63521f1d0..8cef0f2dc70 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -90,7 +90,7 @@ impl Plugins { callback, } in callbacks { - crate::profile_scope!(_name); + crate::profile_scope!("plugin", _name); (callback)(ctx); } } diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index e15a11b62d7..1b4ae6fe058 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -57,8 +57,8 @@ log = { version = "0.4", features = ["std"] } # Optional dependencies: bytemuck = { version = "1.7.1", optional = true } -puffin = { version = "0.18", optional = true } -puffin_http = { version = "0.15", optional = true } +puffin = { workspace = true, optional = true } +puffin_http = { workspace = true, optional = true } # Enable both WebGL & WebGPU when targeting the web (these features have no effect when not targeting wasm32) wgpu = { workspace = true, features = ["webgpu", "webgl"], optional = true } diff --git a/examples/puffin_profiler/Cargo.toml b/examples/puffin_profiler/Cargo.toml index d1329f9f31b..4b7b2e9b4bb 100644 --- a/examples/puffin_profiler/Cargo.toml +++ b/examples/puffin_profiler/Cargo.toml @@ -21,5 +21,5 @@ env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } -puffin = "0.18" -puffin_http = "0.15" +puffin = "0.19" +puffin_http = "0.16" From ff2d25bb40748c253b077456f16b6c2d2d63761d Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 1 Feb 2024 19:56:18 +0100 Subject: [PATCH 3/5] Update to rfd 0.13 --- Cargo.lock | 53 +++++++++++++------------------- crates/egui_demo_app/Cargo.toml | 2 +- examples/file_dialog/Cargo.toml | 2 +- examples/file_dialog/src/main.rs | 6 ++-- examples/save_plot/Cargo.toml | 2 +- 5 files changed, 28 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb6deab15d4..7659dd80810 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -389,9 +389,9 @@ dependencies = [ [[package]] name = "atk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", @@ -628,9 +628,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "libc", "system-deps", @@ -1693,9 +1693,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", @@ -1706,9 +1706,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1770,9 +1770,9 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", @@ -1794,9 +1794,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps", @@ -1881,9 +1881,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", @@ -1944,9 +1944,9 @@ dependencies = [ [[package]] name = "gtk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -2709,9 +2709,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", @@ -3125,14 +3125,12 @@ dependencies = [ [[package]] name = "rfd" -version = "0.11.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" +checksum = "c0d8ab342bcc5436e04d3a4c1e09e17d74958bfaddf8d5fad6f85607df0f994f" dependencies = [ - "async-io", "block", "dispatch", - "futures-util", "glib-sys", "gobject-sys", "gtk-sys", @@ -3145,7 +3143,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.44.0", + "windows-sys 0.48.0", ] [[package]] @@ -4390,15 +4388,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.48.0" diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index 1b4ae6fe058..3c7b5b96c58 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -81,7 +81,7 @@ env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } -rfd = { version = "0.11", optional = true } +rfd = { version = "0.13", optional = true } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/examples/file_dialog/Cargo.toml b/examples/file_dialog/Cargo.toml index 0ad331dff06..11439b18a6d 100644 --- a/examples/file_dialog/Cargo.toml +++ b/examples/file_dialog/Cargo.toml @@ -16,4 +16,4 @@ env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } -rfd = "0.11" +rfd = "0.13" diff --git a/examples/file_dialog/src/main.rs b/examples/file_dialog/src/main.rs index 4077c6de4a2..05248ea7c93 100644 --- a/examples/file_dialog/src/main.rs +++ b/examples/file_dialog/src/main.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release -use eframe::egui; +use eframe::egui::{self, KeyboardShortcut}; fn main() -> Result<(), eframe::Error> { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -28,7 +28,9 @@ impl eframe::App for MyApp { egui::CentralPanel::default().show(ctx, |ui| { ui.label("Drag-and-drop files onto the window!"); - if ui.button("Open file…").clicked() { + let cmd_o = KeyboardShortcut::new(egui::Modifiers::COMMAND, egui::Key::O); + + if ui.button("Open file…").clicked() || ui.input_mut(|i| i.consume_shortcut(&cmd_o)) { if let Some(path) = rfd::FileDialog::new().pick_file() { self.picked_path = Some(path.display().to_string()); } diff --git a/examples/save_plot/Cargo.toml b/examples/save_plot/Cargo.toml index 49a46f58094..810035273d6 100644 --- a/examples/save_plot/Cargo.toml +++ b/examples/save_plot/Cargo.toml @@ -13,7 +13,7 @@ eframe = { path = "../../crates/eframe", features = [ ] } egui_plot = { path = "../../crates/egui_plot" } image = { version = "0.24", default-features = false, features = ["png"] } -rfd = "0.11.0" +rfd = "0.13.0" env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", From b64019723215b8b6fadfef21736556ed5484ff5a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 1 Feb 2024 19:57:53 +0100 Subject: [PATCH 4/5] Update glutin --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7659dd80810..d32298f05b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1161,7 +1161,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.0", + "libloading 0.7.4", ] [[package]] @@ -1816,9 +1816,9 @@ dependencies = [ [[package]] name = "glutin" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca18d477e18c996c1fd1a50e04c6a745b67e2d512c7fb51f2757d9486a0e3ee" +checksum = "005459a22af86adc706522d78d360101118e2638ec21df3852fcc626e0dbb212" dependencies = [ "bitflags 2.4.0", "cfg_aliases", @@ -1985,7 +1985,7 @@ dependencies = [ "bitflags 2.4.0", "com", "libc", - "libloading 0.8.0", + "libloading 0.7.4", "thiserror", "widestring", "winapi", @@ -4312,7 +4312,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.0", + "libloading 0.7.4", "log", "metal", "naga", From a70aeabd7d0a0a36b60bd73c0f76ef5418c45421 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 1 Feb 2024 20:05:34 +0100 Subject: [PATCH 5/5] Revert "Update to rfd 0.13" This reverts commit ff2d25bb40748c253b077456f16b6c2d2d63761d. --- Cargo.lock | 53 +++++++++++++++++++------------- crates/egui_demo_app/Cargo.toml | 2 +- examples/file_dialog/Cargo.toml | 2 +- examples/file_dialog/src/main.rs | 6 ++-- examples/save_plot/Cargo.toml | 2 +- 5 files changed, 37 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d32298f05b8..c2e0bdf30c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -389,9 +389,9 @@ dependencies = [ [[package]] name = "atk-sys" -version = "0.18.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" dependencies = [ "glib-sys", "gobject-sys", @@ -628,9 +628,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-sys-rs" -version = "0.18.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" dependencies = [ "libc", "system-deps", @@ -1693,9 +1693,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.18.0" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" dependencies = [ "gio-sys", "glib-sys", @@ -1706,9 +1706,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.18.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" +checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1770,9 +1770,9 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio-sys" -version = "0.18.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" dependencies = [ "glib-sys", "gobject-sys", @@ -1794,9 +1794,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.18.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" dependencies = [ "libc", "system-deps", @@ -1881,9 +1881,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.18.0" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" dependencies = [ "glib-sys", "libc", @@ -1944,9 +1944,9 @@ dependencies = [ [[package]] name = "gtk-sys" -version = "0.18.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" +checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -2709,9 +2709,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.18.0" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" dependencies = [ "glib-sys", "gobject-sys", @@ -3125,12 +3125,14 @@ dependencies = [ [[package]] name = "rfd" -version = "0.13.0" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d8ab342bcc5436e04d3a4c1e09e17d74958bfaddf8d5fad6f85607df0f994f" +checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" dependencies = [ + "async-io", "block", "dispatch", + "futures-util", "glib-sys", "gobject-sys", "gtk-sys", @@ -3143,7 +3145,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.48.0", + "windows 0.44.0", ] [[package]] @@ -4388,6 +4390,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows" version = "0.48.0" diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index 3c7b5b96c58..1b4ae6fe058 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -81,7 +81,7 @@ env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } -rfd = { version = "0.13", optional = true } +rfd = { version = "0.11", optional = true } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/examples/file_dialog/Cargo.toml b/examples/file_dialog/Cargo.toml index 11439b18a6d..0ad331dff06 100644 --- a/examples/file_dialog/Cargo.toml +++ b/examples/file_dialog/Cargo.toml @@ -16,4 +16,4 @@ env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } -rfd = "0.13" +rfd = "0.11" diff --git a/examples/file_dialog/src/main.rs b/examples/file_dialog/src/main.rs index 05248ea7c93..4077c6de4a2 100644 --- a/examples/file_dialog/src/main.rs +++ b/examples/file_dialog/src/main.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release -use eframe::egui::{self, KeyboardShortcut}; +use eframe::egui; fn main() -> Result<(), eframe::Error> { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -28,9 +28,7 @@ impl eframe::App for MyApp { egui::CentralPanel::default().show(ctx, |ui| { ui.label("Drag-and-drop files onto the window!"); - let cmd_o = KeyboardShortcut::new(egui::Modifiers::COMMAND, egui::Key::O); - - if ui.button("Open file…").clicked() || ui.input_mut(|i| i.consume_shortcut(&cmd_o)) { + if ui.button("Open file…").clicked() { if let Some(path) = rfd::FileDialog::new().pick_file() { self.picked_path = Some(path.display().to_string()); } diff --git a/examples/save_plot/Cargo.toml b/examples/save_plot/Cargo.toml index 810035273d6..49a46f58094 100644 --- a/examples/save_plot/Cargo.toml +++ b/examples/save_plot/Cargo.toml @@ -13,7 +13,7 @@ eframe = { path = "../../crates/eframe", features = [ ] } egui_plot = { path = "../../crates/egui_plot" } image = { version = "0.24", default-features = false, features = ["png"] } -rfd = "0.13.0" +rfd = "0.11.0" env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime",