Merge absolute-x and absolute-y "virtual" properties into absolute-position (#2942)

The type of thep property is `Point`, which existed before. It was
mapped to `slint::private_unstable_api::re_exports::Point` (euclid) and
is now mapped to slint::LogicalPosition (also in C++).
This commit is contained in:
Simon Hausmann 2023-06-21 08:17:57 +02:00 committed by GitHub
parent d5784811c7
commit ab0e38c76d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 80 additions and 63 deletions

View file

@ -37,12 +37,13 @@ pub fn load_builtins(register: &mut TypeRegister) {
for s in doc.StructDeclaration().chain(doc.ExportsList().flat_map(|e| e.StructDeclaration())) {
let external_name = identifier_text(&s.DeclaredIdentifier()).unwrap();
let mut ty = object_tree::type_struct_from_node(s.ObjectType(), &mut diag, register, None);
if let Type::Struct { name, .. } = &mut ty {
if let Type::Struct { name, node, .. } = &mut ty {
*name = Some(
parse_annotation("name", &s.ObjectType())
.map_or_else(|| external_name.clone(), |s| s.unwrap())
.to_owned(),
);
*node = None;
} else {
unreachable!()
}