Merge pull request #3499 from aiongg/next-green-1125

next: green gate (merges #3443 and #3493)
This commit is contained in:
aiongg
2026-11-25 08:21:06 -05:00
committed by GitHub
5 changed files with 22 additions and 5 deletions
@@ -717,7 +717,7 @@ fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() {
let band = |group: u64| fixture.part_rect(id, GRIP.at(group)).expect("each group keeps a grip band");
let (first, last, next) = (cell(0), cell(1), cell(2));
let (top, lower) = (band(0), band(1));
assert!(first.top() < gripped_first.top() - 0.5, "the first icon {first:?} stands higher than under a grip strip {gripped_first:?}");
assert!(first.top() < gripped_first.top(), "the first icon {first:?} stands higher than under a grip strip {gripped_first:?}");
for (group, band) in [top, lower].into_iter().enumerate() {
assert!(grip_ticks(&shapes, band).is_none(), "group {group}: the band shows no marks");
}
@@ -733,7 +733,7 @@ fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() {
let between: Vec<_> = level.iter().filter(|(a, _, _)| a.y > last.bottom() && a.y < next.top()).collect();
let [(a, b, ink)] = between.as_slice() else { panic!("one rule between the groups: {level:?}") };
let middle = (last.bottom() + next.top()) / 2.0;
assert!((a.y - middle).abs() <= 0.5, "the rule {a:?} lies in the middle of the room from {last:?} to {next:?}");
assert!(near(a.y, middle), "the rule {a:?} lies in the middle of the room from {last:?} to {next:?}");
let (left, right) = (a.x.min(b.x), a.x.max(b.x));
let span = right - left;
assert!(left > 0.0 && right < RAIL && span > RAIL - span, "the rule reaches across the column, short of its sides: {a:?} to {b:?}");
+1 -1
View File
@@ -878,7 +878,7 @@ impl StartScreen<'_> {
column_links(&page, ui, links_title.as_ref(), links);
});
});
ui.allocate_space(vec2(0.0, margin));
ui.add_space(env.tokens.size.page.margin);
});
return StartOutput { response: shown.output, actions: actions.into_inner() };
}
+2 -1
View File
@@ -305,7 +305,7 @@ pub struct TileStyle {
}
/// The paper of a page picture (`Tile::page`): a document's blank page, which is data, not a theme surface.
const PAPER: DataColor = DataColor::new(Color32::WHITE);
const PAPER: DataColor = DataColor::new(Color32::WHITE); // design: allow[raw-colour/const](a document's blank page is data, not a theme surface)
/// A `width` by `height` page centred in `picture` on the knob's shadow, the theme's short hard shadow of a part lifted
/// just off the surface under it. The page's longer side spans the largest square the picture holds with the shadow,
@@ -554,6 +554,7 @@ impl<'a> Tile<'a> {
/// that stands for a document size shows it this way (New Document's presets in `PresetCardLook::Page`, a start
/// page's page templates).
#[must_use]
// design: allow[props/point-size](only the page's shape counts: `width` and `height` are a proportion in any one unit)
pub fn page(self, width: f64, height: f64) -> Self {
self.flat_thumbnail().thumb(ThumbAspect::new(2, 1), move |cx: &ContentPainterCx<'_>, picture: Rect| paint_page(cx, picture, width, height))
}
@@ -1 +1,17 @@
config_version = 1
[[exception]]
name = "tile-page-paper-white"
kind = "marker"
rule = "raw-colour/const"
path = "crates/ui-widgets/src/tile_grid/tile.rs"
reason = "A page picture's paper is a document's blank page, which is data (`DataColor`), not a theme surface."
count = 1
[[exception]]
name = "tile-page-proportion"
kind = "marker"
rule = "props/point-size"
path = "crates/ui-widgets/src/tile_grid/tile.rs"
reason = "`Tile::page` takes a page's width and height in any one unit: only their proportion counts, never a size in points."
count = 1
+1 -1
View File
@@ -64,7 +64,7 @@ Grouped by gallery level, then shape, then name.
| `Disclosure` | Leaf | `craft_ui_widgets::controls::disclosure` | A button bound to an open state, with the expanded state |
| `IconButton` | Leaf | `craft_ui_widgets::buttons::icon_button` | A square button showing only an icon |
| `Kbd` | Leaf | `craft_ui_widgets::display::kbd` | A key chord |
| `Link` | Leaf | `craft_ui_widgets::buttons::link` | A link: drawn in the accent colour in a type role (body by default) and underlined, so colour is not its only cue |
| `Link` | Leaf | `craft_ui_widgets::buttons::link` | A link: drawn in the accent colour in a type role (body by default) and underlined, so colour is not its only cue (`LinkLook::Plain` drops the underline of a link standing alone) |
| `LinkedFields` | Leaf | `craft_ui_widgets::text::linked` | `N` number fields joined by a link toggle |
| `NumberField` | Leaf | `craft_ui_widgets::text::number` | A number field: a text part over [`NumberCodec`]; empty text is `None` |
| `PointPicker` | Leaf | `craft_ui_widgets::value_drag::point_picker` | A point `[x, y]` picked on a well: x grows to the right and y downwards, as image coordinates do, in either reading direction |