mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Remove implicit_size from the Item vtable
Use the preferred size in the layouting_info instead.
This commit is contained in:
parent
c6103aa9ce
commit
81473c2541
9 changed files with 31 additions and 159 deletions
|
@ -43,7 +43,7 @@ pub enum BuiltinFunction {
|
|||
ColorBrighter,
|
||||
ColorDarker,
|
||||
Rgb,
|
||||
ImplicitItemSize,
|
||||
ImplicitLayoutInfo,
|
||||
RegisterCustomFontByPath,
|
||||
RegisterCustomFontByMemory,
|
||||
}
|
||||
|
@ -97,18 +97,8 @@ impl BuiltinFunction {
|
|||
BuiltinFunction::StringIsFloat => {
|
||||
Type::Function { return_type: Box::new(Type::Bool), args: vec![Type::String] }
|
||||
}
|
||||
BuiltinFunction::ImplicitItemSize => Type::Function {
|
||||
return_type: Box::new(Type::Struct {
|
||||
fields: [
|
||||
("width".to_string(), Type::LogicalLength),
|
||||
("height".to_string(), Type::LogicalLength),
|
||||
]
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect(),
|
||||
name: Some("Size".to_string()),
|
||||
node: None,
|
||||
}),
|
||||
BuiltinFunction::ImplicitLayoutInfo => Type::Function {
|
||||
return_type: Box::new(crate::layout::layout_info_type()),
|
||||
args: vec![Type::ElementReference],
|
||||
},
|
||||
BuiltinFunction::ColorBrighter => Type::Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue