Permit rotation properties on Text elements without children

This works with Skia, Qt, and FemtoVG.

cc #1481
This commit is contained in:
Simon Hausmann 2024-07-03 08:44:29 +02:00 committed by Simon Hausmann
parent c250865032
commit 7896e645b2
2 changed files with 13 additions and 7 deletions

View file

@ -5,14 +5,18 @@ export Ex1 := Rectangle {
Rectangle {
rotation-origin-x: width / 2;
rotation-angle: 45deg;
// ^error{rotation properties can only be applied to the Image element}
// ^error{rotation properties can only be applied to the Image or Text element}
rotation-origin-y: width / 2;
}
Rectangle {
// ^error{rotation properties can only be applied to the Image element}
// ^error{rotation properties can only be applied to the Image or Text element}
rotation-origin-x: width / 2;
rotation-origin-y: width / 2;
}
Text {
rotation-angle: 90deg;
}
}
RotImg := Image {
@ -53,7 +57,7 @@ export Ex3 := Rectangle {
Rectangle {}
}
i2 := Rectangle {}
// ^error{rotation properties can only be applied to the Image element}
// ^error{rotation properties can only be applied to the Image or Text element}
TouchArea {
clicked => {
@ -67,5 +71,5 @@ export component Ex4 {
in property rot <=> rect . rotation-angle;
rect := Rectangle {}
// ^error{rotation properties can only be applied to the Image element}
// ^error{rotation properties can only be applied to the Image or Text element}
}