diff --git a/crates/draw/src/ui/artboard/properties.rs b/crates/draw/src/ui/artboard/properties.rs index 49096fb15..23d386b03 100644 --- a/crates/draw/src/ui/artboard/properties.rs +++ b/crates/draw/src/ui/artboard/properties.rs @@ -125,11 +125,11 @@ impl<'a> ArtboardProperties<'a> { }; let resized = |size: (f64, f64)| Rect::new(rect.x0, rect.y0, rect.x0 + size.0, rect.y0 + size.1); let moved = |at: (f64, f64)| Rect::new(at.0, at.1, at.0 + width, at.1 + height); - Row::new().show(ui, |ui, _| { + Row::new().fill_width().show(ui, |ui, _| { rect_events.extend(field(ui, &words.width, &words.width_name, width, &SIDE).map(|v| resized((v.unwrap_or(width), height)))); rect_events.extend(field(ui, &words.height, &words.height_name, height, &SIDE).map(|v| resized((width, v.unwrap_or(height))))); }); - Row::new().show(ui, |ui, _| { + Row::new().fill_width().show(ui, |ui, _| { rect_events.extend(field(ui, &words.x, &words.x, rect.x0, &OFFSET).map(|v| moved((v.unwrap_or(rect.x0), rect.y0)))); rect_events.extend(field(ui, &words.y, &words.y, rect.y0, &OFFSET).map(|v| moved((rect.x0, v.unwrap_or(rect.y0))))); }); diff --git a/crates/draw/tests/it/brush_presets.rs b/crates/draw/tests/it/brush_presets.rs index 1cf4f9575..f1e55e5ac 100644 --- a/crates/draw/tests/it/brush_presets.rs +++ b/crates/draw/tests/it/brush_presets.rs @@ -51,6 +51,6 @@ fn rename_brush_opens_the_name_field_on_the_current_preset() { fixture.key(Key::Enter, Modifiers::NONE); fixture.idle(3); let host = host.borrow(); - let renamed = host.picks.iter().any(|pick| matches!(pick, BrushPick::List(PresetEvent::Rename { key: HARD, text }) if text == "Hard Square")); + let renamed = host.picks.iter().any(|pick| matches!(pick, BrushPick::List(PresetEvent::Rename { key: HARD, text, .. }) if text == "Hard Square")); assert!(renamed, "the typed name comes back as the browser's rename of the current preset: {:?}", host.picks); } diff --git a/crates/draw/tests/it/stroke_button.rs b/crates/draw/tests/it/stroke_button.rs index c58aa51f7..d3d250303 100644 --- a/crates/draw/tests/it/stroke_button.rs +++ b/crates/draw/tests/it/stroke_button.rs @@ -2,7 +2,7 @@ //! change of width. use craft_draw::ui::stroke::{LineStyle, StrokeButton, StrokeStyle}; -use craft_ui::contract::Bind; +use craft_ui::contract::{Bind, Show as _}; use craft_ui::testing::{Fixture, trial}; use std::cell::RefCell; use std::rc::Rc; diff --git a/crates/ui-contract/src/primitives/kit.rs b/crates/ui-contract/src/primitives/kit.rs index 7ffdd307e..8c497bd0e 100644 --- a/crates/ui-contract/src/primitives/kit.rs +++ b/crates/ui-contract/src/primitives/kit.rs @@ -12,7 +12,7 @@ use craft_behavior::{Axis, CanvasView, kurbo}; use egui::epaint::{RectShape, Vertex}; use egui::{ Color32, ColorImage, Context, CornerRadius, Mesh, Pos2, Rect, Shape, Stroke, TextureFilter, TextureId, TextureOptions, TextureWrapMode, Vec2, - pos2, vec2, + pos2, }; use std::f32::consts::{FRAC_PI_2, TAU};