mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Rename Rectangle.color to Rectangle.background
Add support for built-in property aliases and rename `color` to `background` - in preparation for it also changing to type brush. Right now the alias is silent, a deprecation and overall change will come in a subsequent change.
This commit is contained in:
parent
c479fd132d
commit
1f091cb1c0
16 changed files with 250 additions and 131 deletions
|
@ -420,13 +420,13 @@ impl Expression {
|
|||
Expression::NumberLiteral(_, unit) => unit.ty(),
|
||||
Expression::BoolLiteral(_) => Type::Bool,
|
||||
Expression::TwoWayBinding(NamedReference { element, name }, _) => {
|
||||
element.upgrade().unwrap().borrow().lookup_property(name)
|
||||
element.upgrade().unwrap().borrow().lookup_property(name).property_type
|
||||
}
|
||||
Expression::CallbackReference(NamedReference { element, name }) => {
|
||||
element.upgrade().unwrap().borrow().lookup_property(name)
|
||||
element.upgrade().unwrap().borrow().lookup_property(name).property_type
|
||||
}
|
||||
Expression::PropertyReference(NamedReference { element, name }) => {
|
||||
element.upgrade().unwrap().borrow().lookup_property(name)
|
||||
element.upgrade().unwrap().borrow().lookup_property(name).property_type
|
||||
}
|
||||
Expression::BuiltinFunctionReference(funcref) => funcref.ty(),
|
||||
Expression::MemberFunction { member, .. } => member.ty(),
|
||||
|
@ -456,7 +456,7 @@ impl Expression {
|
|||
Type::Object { fields, .. } => {
|
||||
fields.get(name.as_str()).unwrap_or(&Type::Invalid).clone()
|
||||
}
|
||||
Type::Component(c) => c.root_element.borrow().lookup_property(name.as_str()),
|
||||
Type::Component(c) => c.root_element.borrow().lookup_property(name).property_type,
|
||||
_ => Type::Invalid,
|
||||
},
|
||||
Expression::Cast { to, .. } => to.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue