apply suggested fix (#481)
This commit is contained in:
parent
998e07d865
commit
2b4d3fa5b1
|
|
@ -113,7 +113,6 @@ impl Frame {
|
||||||
|
|
||||||
pub struct Prepared {
|
pub struct Prepared {
|
||||||
pub frame: Frame,
|
pub frame: Frame,
|
||||||
outer_rect_bounds: Rect,
|
|
||||||
where_to_put_background: ShapeIdx,
|
where_to_put_background: ShapeIdx,
|
||||||
pub content_ui: Ui,
|
pub content_ui: Ui,
|
||||||
}
|
}
|
||||||
|
|
@ -134,7 +133,6 @@ impl Frame {
|
||||||
|
|
||||||
Prepared {
|
Prepared {
|
||||||
frame: self,
|
frame: self,
|
||||||
outer_rect_bounds,
|
|
||||||
where_to_put_background,
|
where_to_put_background,
|
||||||
content_ui,
|
content_ui,
|
||||||
}
|
}
|
||||||
|
|
@ -175,10 +173,7 @@ impl Frame {
|
||||||
|
|
||||||
impl Prepared {
|
impl Prepared {
|
||||||
pub fn outer_rect(&self) -> Rect {
|
pub fn outer_rect(&self) -> Rect {
|
||||||
Rect::from_min_max(
|
self.content_ui.min_rect().expand2(self.frame.margin)
|
||||||
self.outer_rect_bounds.min,
|
|
||||||
self.content_ui.min_rect().max + self.frame.margin,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn end(self, ui: &mut Ui) -> Response {
|
pub fn end(self, ui: &mut Ui) -> Response {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue