Olivier Goffart
a2d5ddaeca
Fix priority of aliases when default value are involved
...
This code would have unpredictable results:
```slint
export Button := Rectangle {
property<bool> the_enabled <=> touch.enabled;
property<bool> the_visible <=> touch.visible;
background: !the_enabled ? blue : red;
border-color: !the_visible ? green : yellow;
border-width: 15px;
touch := TouchArea {}
fs := FocusScope {
enabled <=> root.the_enabled;
visible <=> root.the_visible;
}
}
Demo := Rectangle {
VerticalLayout {
spacing: 10px;
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
Button { the_enabled: false; the_visible: false; }
}
}
```
Because the enabled and visible property defaults to true (default
enforced by the compiler), but we set it also to false via an alias
2022-05-09 09:30:01 +02:00
Olivier Goffart
01bf529f79
Properly initialize the default binding of a state to its materialized value
...
Fixes #1237
2022-05-06 12:55:42 +02:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00