From 26118d212ba7f64b93b3570aedb4c6fc2cfe68b1 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 29 Oct 2026 12:17:12 +0700 Subject: [PATCH] #858: the stroke row test from #1452 checks the grid's 8 pt right margin --- crates/ui-egui/src/stroke_row_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/stroke_row_tests.rs b/crates/ui-egui/src/stroke_row_tests.rs index 18ed7a004..4ccb34ce7 100644 --- a/crates/ui-egui/src/stroke_row_tests.rs +++ b/crates/ui-egui/src/stroke_row_tests.rs @@ -50,14 +50,14 @@ fn weight_field_keeps_its_value_beside_the_variable_button() { } } -/// The row's last button (Advanced) stays inside the panel's padding, in line with the panel's -/// icon column, also with the per-side button beside the weight. +/// The row's last button (Advanced) stays inside the panel's 8 pt right margin (#858's grid), in +/// line with the section headers' buttons, also with the per-side button beside the weight. #[test] fn stroke_row_buttons_stay_inside_the_panel() { for kind in ["rectangle", "ellipse"] { let mut u = scene(kind); let advanced = named_button(&mut u, "Advanced stroke"); - let panel_right = u.ctx.content_rect().max.x - crate::widgets::PAD; + let panel_right = u.ctx.content_rect().max.x - crate::widgets::PAD_RIGHT; assert!(advanced.max.x <= panel_right + 0.5, "{kind}: Advanced at {advanced:?} runs past the panel's edge {panel_right}"); if kind == "rectangle" { let sides = named_button(&mut u, "Individual strokes");