DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
egui 0.37: the renamed APIs in this branch's code
moppeeer38d84c00814c
diff --git a/crates/ui-egui/src/panels/color_panel_tests.rs b/crates/ui-egui/src/panels/color_panel_tests.rsindex 05d5899b6..153216100 100644--- a/crates/ui-egui/src/panels/color_panel_tests.rs+++ b/crates/ui-egui/src/panels/color_panel_tests.rs@@ -95,7 +95,7 @@ fn the_color_panel_edits_the_gradient_stop_selected_in_the_gradient_panel() {app.run("object.gradient", json!({})).unwrap();let mut h = harness(app);h.run_steps(2);- h.ctx.data_mut(|d| d.insert_temp(egui::Id::new(GRAD_SEL), RampSel::Stop(1)));+ h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique(GRAD_SEL), RampSel::Stop(1)));h.run_steps(3);assert!(h.query_by_label("R=0 G=0 B=0").is_some(), "the black stop's values");// C: the topmost field.diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rsindex 92d7ff2ef..854e16a89 100644--- a/crates/ui-egui/src/panels/swatches.rs+++ b/crates/ui-egui/src/panels/swatches.rs@@ -581,7 +581,7 @@ fn cmyk_ramp(k: usize, x: f32) -> egui::Color32 {fn gradient_stop(app: &mut DesignApp, ui: &mut egui::Ui, g: &designcraft_color::Gradient, target: &str, mode: ColorMode) {use designcraft_color::Color;let t = Tokens::get(ui.ctx());- let sel: RampSel = ui.data(|d| d.get_temp(egui::Id::new(GRAD_SEL))).unwrap_or(RampSel::Stop(0));+ let sel: RampSel = ui.data(|d| d.get_temp(egui::Id::unique(GRAD_SEL))).unwrap_or(RampSel::Stop(0));let i = match sel {RampSel::Stop(i) | RampSel::Mid(i) => i,}