mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00

This also separates the blend-to-screen part of render_layer into a helper function, as that will be useful in the future with public layer elements. Relates to #725
44 lines
1 KiB
Text
44 lines
1 KiB
Text
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
export TestCase := Window {
|
|
preferred-width: 800px;
|
|
preferred-height: 600px;
|
|
background: white;
|
|
|
|
Rectangle {
|
|
background: purple;
|
|
height: 50px;
|
|
Text {
|
|
text: "This is purple rectangle, for comparison";
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
opacity: 0.5;
|
|
width: 200px;
|
|
height: 100px;
|
|
y: 50px;
|
|
|
|
background: red;
|
|
|
|
Text {
|
|
text: "This rectangle should be rose";
|
|
}
|
|
|
|
Rectangle {
|
|
background: blue;
|
|
width: 400px;
|
|
height: 50px;
|
|
x: 25px;
|
|
y: 25px;
|
|
|
|
Text {
|
|
text: "This rectangle should be evenly filled with a blue'ish tint, not purple as well as be wider than the rose rectangle.";
|
|
color: green;
|
|
width: 400px;
|
|
wrap: word-wrap;
|
|
}
|
|
}
|
|
}
|
|
}
|