REVERT: clip frame contents to frame border

can't do that quite as simply as I tried to :'(
This commit is contained in:
Emil Ernerfeldt 2020-11-27 15:42:24 +01:00
parent d8aeaa4b49
commit 201586d512

View file

@ -101,8 +101,10 @@ impl Frame {
let where_to_put_background = ui.painter().add(PaintCmd::Noop); let where_to_put_background = ui.painter().add(PaintCmd::Noop);
let outer_rect_bounds = ui.available(); let outer_rect_bounds = ui.available();
let inner_rect = outer_rect_bounds.shrink2(self.margin); let inner_rect = outer_rect_bounds.shrink2(self.margin);
let mut content_ui = ui.child_ui(inner_rect, *ui.layout()); let content_ui = ui.child_ui(inner_rect, *ui.layout());
content_ui.set_clip_rect(outer_rect_bounds.shrink(self.stroke.width * 0.5)); // Don't color outside the lines
// content_ui.set_clip_rect(outer_rect_bounds.shrink(self.stroke.width * 0.5)); // Can't do this since we don't know final size yet
Prepared { Prepared {
frame: self, frame: self,
outer_rect_bounds, outer_rect_bounds,