mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Permit rotation properties on Text elements without children
This works with Skia, Qt, and FemtoVG. cc #1481
This commit is contained in:
parent
c250865032
commit
7896e645b2
2 changed files with 13 additions and 7 deletions
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue