slint/sixtyfps_compiler/tests/syntax/basic/path_layout.60

29 lines
No EOL
705 B
Text

/* LICENSE BEGIN
This file is part of the SixtyFPS Project -- https://sixtyfps.io
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
SPDX-License-Identifier: GPL-3.0-only
This file is also available under commercial licensing terms.
Please contact info@sixtyfps.io for more information.
LICENSE END */
X := Rectangle {
PathLayout {
for item[index] in [
{name: "First Item"},
{name: "Second Item"}
] : Text {
text: item.name;
}
x: 50px;
y: 50px;
LineTo {
x: 300;
y: 300;
}
}
}