From c8a3b0386dc3f2b68765da03928491e6957ecd17 Mon Sep 17 00:00:00 2001 From: hnoerenberg Date: Tue, 24 Nov 2026 20:43:10 +0100 Subject: [PATCH] Call session presets as a method: main turned the engine's presets field into an accessor --- crates/ui-egui/src/tools/shape_options.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tools/shape_options.rs b/crates/ui-egui/src/tools/shape_options.rs index 439fb73bb9..2e3660af0d 100644 --- a/crates/ui-egui/src/tools/shape_options.rs +++ b/crates/ui-egui/src/tools/shape_options.rs @@ -389,11 +389,11 @@ pub(crate) fn pen_paint_swatches(app: &mut PhotocraftApp, ui: &mut egui::Ui) { let sampled = [ShapePaint::Fill, ShapePaint::Stroke].into_iter().find_map(|p| crate::screen_picker::take(app, ("pen-bar", p)).map(|c| (p, c))); let recent_colors: Vec = crate::paint_picker::recent_colors(&app.session).into_iter().map(|c| srgba([c[0], c[1], c[2], 1.0])).collect(); - let groups = ShapeGradients::groups_of(&app.session.presets.gradients, fg, bg); - let gradients = ShapeGradients { groups, current: &app.session.presets.gradient, recent: &mut app.ui.recent_gradients, fg, bg }; + let groups = ShapeGradients::groups_of(&app.session.presets().gradients, fg, bg); + let gradients = ShapeGradients { groups, current: &app.session.presets().gradient, recent: &mut app.ui.recent_gradients, fg, bg }; let current = [fill.clone(), stroke.as_ref().map(|s| s.paint.clone())]; let mut library = - ChipLibrary::new(&recent_colors, &app.session.presets.swatches, &mut app.ui.paint_folders, gradients, &mut app.ui.shape_gradient_state, current); + ChipLibrary::new(&recent_colors, &app.session.presets().swatches, &mut app.ui.paint_folders, gradients, &mut app.ui.shape_gradient_state, current); let words = Env::of(ui).words::(); // The Field's label is the control's accessible name, so the swatches answer to the // reference's "Fill:" and "Stroke:"; inside, the chips keep the shape tools' names and tips.