diff --git a/Cargo.lock b/Cargo.lock index 85341aa9..99444275 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" +checksum = "74a4b14f3d99c1255dcba8f45621ab1a2e7540a0009652d33989005a4d0bfc6b" dependencies = [ "enumn", "serde", @@ -36,9 +36,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -360,6 +360,12 @@ dependencies = [ "cc", ] +[[package]] +name = "color-hex" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecdffb913a326b6c642290a0d0ec8e8d6597291acdc07cc4c9cb4b3635d44cf9" + [[package]] name = "color_quant" version = "1.1.0" @@ -620,22 +626,25 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecolor" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20930a432bbd57a6d55e07976089708d4893f3d556cf42a0d79e9e321fa73b10" +checksum = "2e6b451ff1143f6de0f33fc7f1b68fecfd2c7de06e104de96c4514de3f5396f8" dependencies = [ "bytemuck", + "color-hex", + "emath", "serde", ] [[package]] name = "egui" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584c5d1bf9a67b25778a3323af222dbe1a1feb532190e103901187f92c7fe29a" +checksum = "20c97e70a2768de630f161bb5392cbd3874fcf72868f14df0e002e82e06cb798" dependencies = [ "accesskit", "ahash", + "emath", "epaint", "nohash-hasher", "serde", @@ -643,9 +652,9 @@ dependencies = [ [[package]] name = "egui_demo_lib" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbfa3df7b7975553dfe72a06a401b0450af66af4ed5fe89340b095d658f954c0" +checksum = "78fd33ffd7c7a17d4b01462afc5cd421d6b81abea83064501d44c5af3a62e3b0" dependencies = [ "egui", "egui_extras", @@ -656,10 +665,11 @@ dependencies = [ [[package]] name = "egui_extras" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b78779f35ded1a853786c9ce0b43fe1053e10a21ea3b23ebea411805ce41593" +checksum = "5bb783d9fa348f69ed5c340aa25af78b5472043090e8b809040e30960cc2a746" dependencies = [ + "ahash", "egui", "enum-map", "log", @@ -669,11 +679,13 @@ dependencies = [ [[package]] name = "egui_plot" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7854b86dc1c2d352c5270db3d600011daa913d6b554141a03939761323288a1" +checksum = "c7acc4fe778c41b91d57e04c1a2cf5765b3dc977f9f8384d2bb2eb4254855365" dependencies = [ + "ahash", "egui", + "emath", ] [[package]] @@ -684,9 +696,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "emath" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c3a552cfca14630702449d35f41c84a0d15963273771c6059175a803620f3f" +checksum = "0a6a21708405ea88f63d8309650b4d77431f4bc28fb9d8e6f77d3963b51249e6" dependencies = [ "bytemuck", "serde", @@ -703,9 +715,9 @@ dependencies = [ [[package]] name = "enum-map" -version = "2.6.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e10d4d903e79b6181943defcdc36f61f8f608e5892eca719fb0677799d3f8fe" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" dependencies = [ "enum-map-derive", "serde", @@ -713,9 +725,9 @@ dependencies = [ [[package]] name = "enum-map-derive" -version = "0.13.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb14d927583dd5c2eac0f2cf264fc4762aefe1ae14c47a8a20fc1939d3a5fc0" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", @@ -735,9 +747,9 @@ dependencies = [ [[package]] name = "epaint" -version = "0.27.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b381f8b149657a4acf837095351839f32cd5c4aec1817fc4df84e18d76334176" +checksum = "3f0dcc0a0771e7500e94cd1cb797bd13c9f23b9409bdc3c824e2cbc562b7fa01" dependencies = [ "ab_glyph", "ahash", diff --git a/Cargo.toml b/Cargo.toml index eacb6a46..ce7ca4a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -107,7 +107,7 @@ features = ["default", "glyph", "egui", "text", "extra", "audio", "links", "drop lto = true [dev-dependencies] -egui_demo_lib = "0.27.2" +egui_demo_lib = "0.28.1" bytemuck = "1.14.0" [[example]] diff --git a/crates/notan_egui/Cargo.toml b/crates/notan_egui/Cargo.toml index d2491bbf..c53f1234 100644 --- a/crates/notan_egui/Cargo.toml +++ b/crates/notan_egui/Cargo.toml @@ -19,7 +19,7 @@ notan_macro.workspace = true log.workspace = true bytemuck.workspace = true -egui = { version = "0.27.2", features = ["bytemuck"] } +egui = { version = "0.28.1", features = ["bytemuck"] } [features] links = [] diff --git a/crates/notan_egui/src/plugin.rs b/crates/notan_egui/src/plugin.rs index a023a2a5..cc51d153 100644 --- a/crates/notan_egui/src/plugin.rs +++ b/crates/notan_egui/src/plugin.rs @@ -190,10 +190,12 @@ impl Plugin for EguiPlugin { if modifiers.ctrl || modifiers.command { let factor = (delta_y / 200.0).exp(); self.add_event(egui::Event::Zoom(factor)); - } else if cfg!(target_os = "macos") && modifiers.shift { - self.add_event(egui::Event::Scroll(egui::vec2(delta_x + delta_y, 0.0))); } else { - self.add_event(egui::Event::Scroll(egui::vec2(*delta_x, *delta_y))); + self.add_event(egui::Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: egui::vec2(*delta_x, *delta_y), + modifiers, + }); } } Event::MouseEnter { .. } => {}