slint/internal/compiler/tests/syntax/lookup/if.slint
Aurindam Jana 3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00

28 lines
623 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
export Hello := Rectangle {
width: 100phx;
height: 100phx;
background: white;
property<length> top_level: 42phx;
property<bool> cond1;
property<bool> cond2;
property<bool> cond3;
if (cond1) : Rectangle {
background: root.background;
property<length> xx: root.top_level;
}
if (cond1 ? cond2 : cond3) : Rectangle {
}
if (width) : Rectangle {
// ^error{Cannot convert length to bool}
}
}