mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 13:51:13 +00:00
![]() 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 |
||
---|---|---|
.. | ||
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 | ||
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.