slint/tests/cases/expr/debug.slint
Olivier Goffart e540f81cca Mark all our the builtin slint enums as non_exhaustive in Rust
So that if ever we make them public, we can still add values.

... all but the Orientation as it is often used in match and
will never get any other variant
2025-11-21 20:37:32 +01:00

20 lines
598 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
TestCase := Rectangle {
property<string> text: "init";
property<string> text2: { debug(text); text }
callback foo;
foo => {
debug("callback");
}
background: { test; text2; blue }
im := Image {}
property <bool> test: {
debug();
debug(42, 42px, width / 5s, { x: 42, y: im.image_fit, z: { d: im.opacity } }, root.background, im.source, Orientation.horizontal);
true;
}
}