diff --git a/internal/compiler/builtins.slint b/internal/compiler/builtins.slint index 2f66d3040..bfe82b395 100644 --- a/internal/compiler/builtins.slint +++ b/internal/compiler/builtins.slint @@ -64,6 +64,8 @@ export ClippedImage := ImageItem { export { ClippedImage as Image } export Rotate := _ { + property x; + property y; property rotation-angle; property rotation-origin-x; property rotation-origin-y; diff --git a/internal/core/items.rs b/internal/core/items.rs index 106e0ce43..10b2d9b3e 100644 --- a/internal/core/items.rs +++ b/internal/core/items.rs @@ -918,6 +918,8 @@ declare_item_vtable! { #[pin] /// The implementation of the `Rotate` element pub struct Rotate { + pub x: Property, + pub y: Property, pub rotation_angle: Property, pub rotation_origin_x: Property, pub rotation_origin_y: Property, @@ -930,7 +932,7 @@ impl Item for Rotate { fn init(self: Pin<&Self>, _window_adapter: &Rc) {} fn geometry(self: Pin<&Self>) -> Rect { - euclid::rect(0 as _, 0 as _, self.width(), self.height()) + euclid::rect(self.x(), self.y(), self.width(), self.height()) } fn layout_info(