Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Sep 11, 2024
1 parent cb8e984 commit 5bab9c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions masonry/examples/grid_masonry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ fn grid_button(params: GridParams) -> Button {
pub fn main() {
let label = SizedBox::new(
Prose::new(
"Change spacing by right and \
left clicking on the buttons",
"Change spacing by right and left clicking on the buttons",
)
.with_text_size(14.0)
.with_text_alignment(Alignment::Middle),
Expand Down
7 changes: 7 additions & 0 deletions masonry/src/widget/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,13 @@ mod tests {
grid.set_spacing(7.0);
});
assert_render_snapshot!(harness, "with_changed_spacing");

// Make the spacing negative
harness.edit_root_widget(|mut grid| {
let mut grid = grid.downcast::<Grid>();
grid.set_spacing(-4.0);
});
assert_render_snapshot!(harness, "with_negative_spacing");
}

#[test]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5bab9c7

Please sign in to comment.