Introduce Translate primitive in iced_wgpu
This commit is contained in:
parent
2381a9310c
commit
59b1e90661
10 changed files with 127 additions and 104 deletions
|
|
@ -59,12 +59,12 @@ impl pane_grid::Renderer for Renderer {
|
|||
height: bounds.height + 0.5,
|
||||
},
|
||||
offset: Vector::new(0, 0),
|
||||
content: Box::new(Primitive::Cached {
|
||||
origin: Point::new(
|
||||
content: Box::new(Primitive::Translate {
|
||||
translation: Vector::new(
|
||||
cursor_position.x - bounds.x - bounds.width / 2.0,
|
||||
cursor_position.y - bounds.y - bounds.height / 2.0,
|
||||
),
|
||||
cache: std::sync::Arc::new(pane),
|
||||
content: Box::new(pane),
|
||||
}),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue