mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
![]() We see that a lot in the fluent style. For example: ``` font-size: Typography.body.font-size; ``` Where Typography.body is a contant expression define as ``` out property <TextStyle> body: { font-size: 14 * 0.0769rem, font-weight: regular-font-weight }; ``` But because this first converts from an annonymous tuple struct to a named struct, the const propagation used to be confused. Now with this patch it is properly simplified Before this change cargo run -p slint-compiler -- examples/printerdemo_mcu/ui/printerdemo.slint -f rust | rustfmt | wc 38643 84506 1925846 cargo run -p slint-compiler -- examples/gallery/gallery.slint -f rust | rustfmt | wc 103210 224427 5291034 After this change cargo run -p slint-compiler -- examples/printerdemo_mcu/ui/printerdemo.slint -f rust | rustfmt | wc 38629 84473 1924995 cargo run -p slint-compiler -- examples/gallery/gallery.slint -f rust | rustfmt | wc 102628 222423 5261760 |
||
---|---|---|
.. | ||
generator | ||
LICENSES | ||
llr | ||
parser | ||
parser-test-macro | ||
passes | ||
tests | ||
widgets | ||
build.rs | ||
builtin_macros.rs | ||
builtins.slint | ||
Cargo.toml | ||
diagnostics.rs | ||
embedded_resources.rs | ||
expression_tree.rs | ||
fileaccess.rs | ||
generator.rs | ||
langtype.rs | ||
layout.rs | ||
lexer.rs | ||
lib.rs | ||
literals.rs | ||
llr.rs | ||
load_builtins.rs | ||
lookup.rs | ||
namedreference.rs | ||
object_tree.rs | ||
parser.rs | ||
passes.rs | ||
pathutils.rs | ||
README.md | ||
typeloader.rs | ||
typeregister.rs |
The Slint Compiler Library
NOTE: This library is an internal crate of the Slint project.
This crate should not be used directly by applications using Slint.
You should use the slint
crate instead.
WARNING: This crate does not follow the semver convention for versioning and can
only be used with version = "=x.y.z"
in Cargo.toml.