mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Layers panel options: document the functions next to the ones the PR changes
CodeRabbit counts the functions around the lines a PR changes, not only the changed ones, so the PR's docstring coverage stays under its 80% threshold unless the untouched neighbours are documented too. Comments only; no code changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
7a671f1486
commit
a83ec3d2c9
3 files changed
+5
No files matched your search
@@ -2771,6 +2771,7 @@ mod tests {
|
||||
assert!(s.execute("layer.setProps", json!({"locks": {"nope": true}})).is_err());
|
||||
}
|
||||
|
||||
/// `document.inspect` lists the selected layers and marks them in the layer list.
|
||||
#[test]
|
||||
fn inspect_reports_selection() {
|
||||
let mut s = session(8);
|
||||
|
||||
@@ -83,14 +83,17 @@ fn the_clip_cursor_shows_only_with_alt_over_a_line() {
|
||||
assert_ne!(h.output().platform_output.cursor_icon, egui::CursorIcon::None, "mid-row: no line");
|
||||
}
|
||||
|
||||
/// A 32-point-high row for `layer` starting `top` points down, with no thumbnail, name or indicators.
|
||||
fn row(layer: LayerId, top: f32) -> RowRects {
|
||||
RowRects { layer: layer.0, row: Rect::from_min_size(pos2(0.0, top), vec2(240.0, 32.0)), thumbnail: None, name: None, indicators: Vec::new() }
|
||||
}
|
||||
|
||||
/// The id of the layer called `name`, wherever it sits in the tree.
|
||||
fn named(doc: &Document, name: &str) -> LayerId {
|
||||
doc.walk().into_iter().find(|(_, _, l)| l.name == name).unwrap().2.id
|
||||
}
|
||||
|
||||
/// A clipping line appears only between siblings that are neighbours in the stack, not at a group's edge, in the eye column or inside a row.
|
||||
#[test]
|
||||
fn only_siblings_next_to_each_other_meet_at_a_line() {
|
||||
// Background, `d`, and the group `g { c }` above it.
|
||||
|
||||
@@ -172,6 +172,7 @@ pub fn paint(
|
||||
|
||||
type Rects = (Vec<(MaskKind, Rect)>, Vec<(MaskKind, Rect)>);
|
||||
|
||||
/// Memory key of the per-layer record of where the mask thumbnails and chains were drawn.
|
||||
fn rects_id() -> egui::Id {
|
||||
egui::Id::new("mask-thumb-rects")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user