Skip to content

Commit

Permalink
(Slightly) Less broken workarounds for linebender/parley#165
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Nov 21, 2024
1 parent 28beac5 commit f01784a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion masonry/src/widget/prose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ impl Widget for Prose {
let size = ctx.run_layout(&mut self.text, bc);
ctx.place_child(&mut self.text, Point::ORIGIN);
if self.clip {
ctx.set_clip_path(Rect::from_origin_size(Point::ORIGIN, size));
// Workaround for https://github.com/linebender/parley/issues/165
let clip_size = Size::new(size.width, size.height + 20.);
ctx.set_clip_path(Rect::from_origin_size(Point::ORIGIN, clip_size));
}
size
}
Expand Down
3 changes: 2 additions & 1 deletion xilem/examples/http_cats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ impl Status {
image,
// TODO: Overlay on top of the image?
// HACK: Trailing padding workaround scrollbar covering content
// HACK: Bottom padding to workaround https://github.com/linebender/parley/issues/165
sized_box(prose("Copyright ©️ https://http.cat").alignment(TextAlignment::End))
.padding(Padding::trailing(15.)),
.padding(Padding::new(0., 15., 10., 0.)),
))
.main_axis_alignment(xilem::view::MainAxisAlignment::Start)
}
Expand Down

0 comments on commit f01784a

Please sign in to comment.