Fix layer transformations
This commit is contained in:
parent
cc05cb9be4
commit
394e599c3a
6 changed files with 203 additions and 161 deletions
|
|
@ -17,7 +17,7 @@ use crate::core::mouse;
|
|||
use crate::core::renderer;
|
||||
use crate::core::widget::tree::{self, Tree};
|
||||
use crate::core::{
|
||||
Clipboard, Element, Length, Rectangle, Shell, Size, Transformation, Widget,
|
||||
Clipboard, Element, Length, Rectangle, Shell, Size, Vector, Widget,
|
||||
};
|
||||
use crate::graphics::geometry;
|
||||
|
||||
|
|
@ -222,8 +222,8 @@ where
|
|||
|
||||
let state = tree.state.downcast_ref::<P::State>();
|
||||
|
||||
renderer.with_transformation(
|
||||
Transformation::translate(bounds.x, bounds.y),
|
||||
renderer.with_translation(
|
||||
Vector::new(bounds.x, bounds.y),
|
||||
|renderer| {
|
||||
let layers =
|
||||
self.program.draw(state, renderer, theme, bounds, cursor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue