Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat: migrate to egui 0.24 #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[workspace]
members = [
"egui_node_graph",
"egui_node_graph_example",
]
exclude = [ "egui_node_graph_example" ]
members = ["egui_node_graph"]

4 changes: 2 additions & 2 deletions egui_node_graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ workspace = ".."
persistence = ["serde", "slotmap/serde", "smallvec/serde", "egui/persistence"]

[dependencies]
egui = { version = "0.21.0" }
egui = { version = "0.24.0" }
slotmap = { version = "1.0" }
smallvec = { version = "1.10.0" }
smallvec = { version = "1.11.2" }
serde = { version = "1.0", optional = true, features = ["derive"] }
thiserror = "1.0"
10 changes: 9 additions & 1 deletion egui_node_graph/src/editor_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,8 @@ where
.titlebar_color(ui, self.node_id, self.graph, user_state)
.unwrap_or_else(|| background_color.lighten(0.8)),
stroke: Stroke::NONE,
fill_texture_id: Default::default(),
uv: Rect::ZERO,
});

let body_rect = Rect::from_min_size(
Expand All @@ -818,9 +820,11 @@ where
);
let body = Shape::Rect(RectShape {
rect: body_rect,
rounding: Rounding::none(),
rounding: Rounding::ZERO,
fill: background_color,
stroke: Stroke::NONE,
fill_texture_id: Default::default(),
uv: Rect::ZERO,
});

let bottom_body_rect = Rect::from_min_size(
Expand All @@ -832,6 +836,8 @@ where
rounding,
fill: background_color,
stroke: Stroke::NONE,
fill_texture_id: Default::default(),
uv: Rect::ZERO,
});

let node_rect = titlebar_rect.union(body_rect).union(bottom_body_rect);
Expand All @@ -841,6 +847,8 @@ where
rounding,
fill: Color32::WHITE.lighten(0.8),
stroke: Stroke::NONE,
fill_texture_id: Default::default(),
uv: Rect::ZERO,
})
} else {
Shape::Noop
Expand Down
2 changes: 1 addition & 1 deletion egui_node_graph_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rust-version = "1.56"
crate-type = ["cdylib", "rlib"]

[dependencies]
eframe = "0.21.0"
eframe = "0.24.0"
egui_node_graph = { path = "../egui_node_graph" }
anyhow = "1.0"
serde = { version = "1.0", optional = true }
Expand Down