Update egui to 0.32

This commit is contained in:
2025-07-11 15:21:13 +02:00
parent 276508713f
commit c59febd924
6 changed files with 443 additions and 660 deletions

1081
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,16 +12,16 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
pinenote = []
[dependencies]
egui = "0.31"
egui_extras = { version = "0.31", features = ["svg"] }
eframe = { version = "0.31", default-features = false, features = [
egui = "0.32"
egui_extras = { version = "0.32", features = ["svg"] }
egui_glow = "0.32"
eframe = { version = "0.32", default-features = false, features = [
"glow", # alt: "wgpu".
"persistence",
"wayland",
] }
log = "0.4.27"
serde = { version = "1.0.219", features = ["derive"] }
egui_glow = "0.31.1"
rfd = { version = "0.15.3", default-features = false, features = ["gtk3"] }
rand = "0.9.1"
eyre = "0.6.12"
@ -42,13 +42,11 @@ wasm-bindgen-futures = "0.4.50"
web-sys = "0.3.77"
[patch.crates-io]
egui = { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }
eframe = { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }
# egui = { path = "../egui/crates/egui" }
# eframe = { path = "../egui/crates/eframe" }
[dev-dependencies]
insta = { version = "1.43.1", features = ["yaml"] }
# egui = { path = "../egui/crates/egui" }
# eframe = { path = "../egui/crates/eframe" }
[profile.release]
opt-level = 2 # fast and small wasm

View File

@ -292,7 +292,7 @@ impl eframe::App for App {
});
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
egui::containers::menu::Bar::new().ui(ui, |ui| {
egui::MenuBar::new().ui(ui, |ui| {
// NOTE: no File->Quit on web pages!
ui.menu_button("Menu ⚙", |ui| {
ui.label(RichText::new("Action").weak());

View File

@ -454,7 +454,7 @@ fn spawn_file_watcher(p: &Path) -> Inner {
let file = File::open(&path)?;
let mtime = file_mtime(&file)?;
let _ = events_tx.send(FileEvent::NewFileMTime(mtime.into()));
let _ = events_tx.send(FileEvent::NewFileMTime(mtime));
Ok(())
});

View File

@ -42,7 +42,7 @@ impl Tile {
Self {
bounding_box,
image: ColorImage::new([CHUNK_SIZE, CHUNK_SIZE], Color32::TRANSPARENT),
image: ColorImage::filled([CHUNK_SIZE, CHUNK_SIZE], Color32::TRANSPARENT),
texture: None,
texture_is_dirty: false,
}

View File

@ -22,7 +22,7 @@ pub fn rasterize<'a, Blend: BlendFn>(
point_to_pixel: TSTransform,
triangles: impl Iterator<Item = [&'a Vertex; 3]>,
) -> ColorImage {
let mut image = ColorImage::new([width, height], Color32::TRANSPARENT);
let mut image = ColorImage::filled([width, height], Color32::TRANSPARENT);
rasterize_onto::<Blend>(&mut image, point_to_pixel, triangles);
image
}