Apply padding correctly when painting Container
's children
This commit is contained in:
parent
bac543657c
commit
43abd96769
1 changed files with 3 additions and 1 deletions
|
@ -169,7 +169,9 @@ impl Element for Container {
|
|||
border: self.border,
|
||||
corner_radius: self.corner_radius,
|
||||
});
|
||||
self.child.paint(bounds.origin(), ctx);
|
||||
|
||||
let child_origin = quad_bounds.origin() + vec2f(self.padding.left, self.padding.top);
|
||||
self.child.paint(child_origin, ctx);
|
||||
}
|
||||
|
||||
fn dispatch_event(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue