Skip to content

Commit 5bdc34e

Browse files
authored
Merge pull request #97 from xangelix/egui-0.34
Upgrade egui to v0.34
2 parents bbed414 + 8ae52d2 commit 5bdc34e

4 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/msrv.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121
- name: Install MSRV
22-
run: rustup install 1.88
22+
run: rustup install 1.92
2323
- name: Test on MSRV
24-
run: cargo +1.88 test
24+
run: cargo +1.92 test

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ members = ["demo"]
44
resolver = "3"
55

66
[workspace.package]
7-
rust-version = "1.88"
7+
rust-version = "1.92"
88
edition = "2024"
99
license = "MIT OR Apache-2.0"
1010
documentation = "https://docs.rs/egui-snarl"
1111
repository = "https://github.com/zakarumych/egui-snarl"
1212

1313
[workspace.dependencies]
14-
egui = { version = "0.33" }
15-
eframe = { version = "0.33" }
16-
egui_extras = { version = "0.33" }
14+
egui = { version = "0.34" }
15+
eframe = { version = "0.34" }
16+
egui_extras = { version = "0.34" }
1717
syn = { version = "2" }
1818
serde = { version = "1" }
1919
serde_json = { version = "1" }
2020

21-
egui-probe = { version = "0.10.0" }
22-
egui-scale = { version = "0.3.0" }
21+
egui-probe = { version = "0.11.0" }
22+
egui-scale = { version = "0.4.0" }
2323
wasm-bindgen-futures = "0.4"
2424
web-sys = "0.3.81"
2525

examples/demo.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@ impl DemoApp {
965965
pub fn new(cx: &CreationContext) -> Self {
966966
egui_extras::install_image_loaders(&cx.egui_ctx);
967967

968-
cx.egui_ctx.style_mut(|style| style.animation_time *= 10.0);
968+
cx.egui_ctx
969+
.global_style_mut(|style| style.animation_time *= 10.0);
969970

970971
let snarl = cx.storage.map_or_else(Snarl::new, |storage| {
971972
storage
@@ -988,16 +989,16 @@ impl DemoApp {
988989
}
989990

990991
impl App for DemoApp {
991-
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
992-
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
992+
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
993+
egui::Panel::top("top_panel").show_inside(ui, |ui| {
993994
// The top panel is often a good place for a menu bar:
994995

995996
egui::MenuBar::new().ui(ui, |ui| {
996997
#[cfg(not(target_arch = "wasm32"))]
997998
{
998999
ui.menu_button("File", |ui| {
9991000
if ui.button("Quit").clicked() {
1000-
ctx.send_viewport_cmd(egui::ViewportCommand::Close);
1001+
ui.send_viewport_cmd(egui::ViewportCommand::Close);
10011002
}
10021003
});
10031004
ui.add_space(16.0);
@@ -1011,13 +1012,13 @@ impl App for DemoApp {
10111012
});
10121013
});
10131014

1014-
egui::SidePanel::left("style").show(ctx, |ui| {
1015+
egui::Panel::left("style").show_inside(ui, |ui| {
10151016
egui::ScrollArea::vertical().show(ui, |ui| {
10161017
egui_probe::Probe::new(&mut self.style).show(ui);
10171018
});
10181019
});
10191020

1020-
egui::SidePanel::right("selected-list").show(ctx, |ui| {
1021+
egui::Panel::right("selected-list").show_inside(ui, |ui| {
10211022
egui::ScrollArea::vertical().show(ui, |ui| {
10221023
ui.strong("Selected nodes");
10231024

@@ -1049,7 +1050,7 @@ impl App for DemoApp {
10491050
});
10501051
});
10511052

1052-
egui::CentralPanel::default().show(ctx, |ui| {
1053+
egui::CentralPanel::default().show_inside(ui, |ui| {
10531054
SnarlWidget::new()
10541055
.id(Id::new("snarl-demo"))
10551056
.style(self.style)

src/ui/wire.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,6 @@ impl CacheTrait for WiresCache {
678678
fn len(&self) -> usize {
679679
self.bezier_3.len() + self.bezier_5.len() + self.axis_aligned.len()
680680
}
681-
682-
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
683-
self
684-
}
685681
}
686682

687683
impl WiresCache {

0 commit comments

Comments
 (0)