mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Add support for absolute-x and absolute-y properties on any element (#2823)
Fixes #1691
This commit is contained in:
parent
3d5dd2405a
commit
1bf05eae7c
16 changed files with 239 additions and 6 deletions
|
@ -2444,6 +2444,16 @@ fn compile_builtin_function_call(
|
|||
BuiltinFunction::Translate => {
|
||||
quote!(slint::private_unstable_api::translate(#(#a),*))
|
||||
}
|
||||
BuiltinFunction::ItemAbsolutePosition => {
|
||||
if let [Expression::PropertyReference(pr)] = arguments {
|
||||
let item_rc = access_item_rc(pr, ctx);
|
||||
quote!(
|
||||
(*#item_rc).map_to_window(Default::default()).to_untyped()
|
||||
)
|
||||
} else {
|
||||
panic!("internal error: invalid args to MapPointToWindow {:?}", arguments)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue