From cde8e308d3f96a010e16c9fbb2ded3202e2bdff9 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 14 Nov 2026 04:02:54 +0000 Subject: [PATCH] panels-w3: repair 1 --- crates/draw/src/ui/mod.rs | 2 +- crates/draw/src/ui/paint_bar.rs | 15 +++++++-------- crates/draw/tests/it/main.rs | 10 ++-------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/crates/draw/src/ui/mod.rs b/crates/draw/src/ui/mod.rs index 27cc3a6d0..225c2c675 100644 --- a/crates/draw/src/ui/mod.rs +++ b/crates/draw/src/ui/mod.rs @@ -78,11 +78,11 @@ pub use crop::{ }; pub use crop::{PerspectiveCropQuad, PerspectiveQuad}; // PLAN: dl.K55 lists GradientRamp among the items that move to craft-color, but writer note 6 keeps it in this line. +pub use gradient::{GradientFill, GradientFillEditor, GradientFillEditorOutput, GradientFillWords, GradientStyle}; pub use gradient::{ GradientGroup, GradientItem, GradientLine, GradientMap, GradientMapEditor, GradientMapOutput, GradientOverlay, GradientPalette, GradientRamp, GradientRef, GradientSwatch, LineGradient, LinePart, }; -pub use gradient::{GradientFill, GradientFillEditor, GradientFillEditorOutput, GradientFillWords, GradientStyle}; pub use measure::{MIN_LINE, RulerBar, RulerBarOutput, RulerLine, RulerOverlay, RulerPass, RulerTool, RulerWords, box_distances, ruler_line_form}; pub use paint_bar::{ EraserMode, MIXER_COMBINATIONS, MIXER_GROUP_STARTS, MixerValues, PaintBar, PaintBarOutput, PaintBarWords, PaintTool, PaintValues, Smoothing, diff --git a/crates/draw/src/ui/paint_bar.rs b/crates/draw/src/ui/paint_bar.rs index 291975ea6..4d5f08917 100644 --- a/crates/draw/src/ui/paint_bar.rs +++ b/crates/draw/src/ui/paint_bar.rs @@ -6,9 +6,7 @@ use craft_behavior::{EditEvent, EditEvents, IconId, Mixed, Value}; use craft_theme::Srgba; use craft_ui::buttons::IconButton; use craft_ui::choice::{Checkbox, Swatch}; -use craft_ui::contract::{ - Bind, BodyCx, Entry, Gap, LabelKind, Props as _, Remember as _, Show as _, ShowContainer as _, SideLabel, Sizing, Trigger, -}; +use craft_ui::contract::{Bind, BodyCx, Entry, Gap, LabelKind, Props as _, Remember as _, Show as _, ShowContainer as _, SideLabel, Sizing, Trigger}; use craft_ui::display::Divider; use craft_ui::form::Field; use craft_ui::layout_components::Row; @@ -467,12 +465,13 @@ impl Pass<'_, M> { } let shown = self.values.mixer.combination.min(MIXER_COMBINATIONS.len() - 1); let mut pick = None; - Field::new(words.combination.clone()).side(SideLabel::new().kind(LabelKind::Hidden)).id_salt("mixer-combination").sizing(Sizing::Content).show( - ui, - |ui, _| { + Field::new(words.combination.clone()) + .side(SideLabel::new().kind(LabelKind::Hidden)) + .id_salt("mixer-combination") + .sizing(Sizing::Content) + .show(ui, |ui, _| { pick = Select::new(words.combination.clone(), Bind::given(shown), &entries).show(ui).value().copied(); - }, - ); + }); if let Some(index) = pick { self.set_with(&words.combination, |v| { v.mixer.combination = index; diff --git a/crates/draw/tests/it/main.rs b/crates/draw/tests/it/main.rs index a29e261a7..07ae093ec 100644 --- a/crates/draw/tests/it/main.rs +++ b/crates/draw/tests/it/main.rs @@ -1,12 +1,11 @@ //! The screen tests of craft-draw, folded into the lib's test target. +// PLAN: the sheet (writer note 7) registers `corner`, `shape_cells`, `gradient_fill`, `paths_panel`, `crop_size`, `artboard`, `slice` and `presets`, but their files belong to other sets (tools-w8, w10, w11, w14, w18, w19, framework-01-w11) and do not exist in this tree, so the lines would not compile. Each owning set adds its own `mod` line under the group comment below with its file. + // draw-shape mod add_beside; -mod corner; -mod shape_cells; // draw-gradient-b -mod gradient_fill; mod gradient_overlay; // draw-connector @@ -18,17 +17,13 @@ mod bezier; // draw-pen-b mod pen; -mod paths_panel; // draw-crop-b -mod crop_size; mod crop_tool; mod perspective_crop; // draw-bars -mod artboard; mod measure; -mod slice; mod slice_divide; // draw-stroke @@ -39,7 +34,6 @@ mod stroke_editor; mod brush_presets; mod brush_size; mod paint_bar; -mod presets; // draw-transform-a mod transform_box;