How to rotate a widget?

Probably a stupid question. But how can I rotate a widget (label, text, etcetera…) in SLS? I was not able to find an option for this. Have I missed it?

I don’t think this is possible (yet).

You can use a premade image for the text, and rotate the image using lv_img_set_angle

Another option is to create a sprite using Bodmer’s TFT_eSPI.h function library. This library is included by default in the ui.ino when you export SLS UI files. Check the Rotated_Sprite_X examples for more information on how to do this.

Thank you for the reply Hans! I haven’t seen this before, but someone asked a similar question: Rotate label via code
Is it maybe planed to add the transformation options from LVGL 8.3 to SLS soon? In this case: lv_obj_set_style_transform_angle(…,…,…)

I don’t know. I’m not an SLS dev :grinning:
You could try the ‘Feature request’ forum.

1 Like

We haven’t planned it, but it’s simple to add LVGL’s widget rotation support. I’ll discuss it with my colleagues.

1 Like