slint/tests/manual/opacity_inheritance.slint
Simon Hausmann d97710f3f9 Implement correct opacity for the GL backend
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
2022-03-18 16:35:26 +01:00

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;
}
}
}
}