Fix layer transformations

This commit is contained in:
Héctor Ramón Jiménez 2024-04-05 00:40:39 +02:00
parent cc05cb9be4
commit 394e599c3a
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F
6 changed files with 203 additions and 161 deletions

View file

@ -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);