How to rotate a label, picture, any element in GUI Guider?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to rotate a label, picture, any element in GUI Guider?

2,756 次查看
bosnian_beast
Contributor III

I would like to rotate some widgets on the screen because my screen should be able to display in both landscape and portrait. 

My solution is to create two sets of screens for both orientations, but I can't rotate any widgets. As a workaround I could import rotated images and use them, but I can't rotate labels in any way

 

0 项奖励
回复
5 回复数

1,383 次查看
TheSilencerPang
Contributor I

Yes, I have encountered the same problem as you! I just want the label to rotate at any angle, but unfortunately the GUI guider does not support it. This greatly limits UI design. So disgusting! The significance of GUI guider is that what you see is what you get!

0 项奖励
回复

2,614 次查看
bosnian_beast
Contributor III

I want to create two versions of the screen in gui guider, one for horizontal, one for vertical placement. I just need the widgets to rotate, not the screen, not to do any lvgl coding, not to rotate display pixels, not to change the resolution, everything stays the same, only widgets rotate.

 

Untitled.png

2,728 次查看
LiubinGong
NXP Employee
NXP Employee

Hello @bosnian_beast 

     Please follow the below steps to rotate the button:

1. set the screen background opa to 255.

Capture1.PNG

2. write some codes in the current screen custom code. 

Capture2.PNG

3. enable LV_COLOR_SCREEN_TRANSP in project/custom/lv_conf_ext.h.

Capture3.PNG

 

    Hope to help you.

Best regards

Liubin 

 

2,516 次查看
bosnian_beast
Contributor III

Can you please pass this question to the development team to include this feature in future versions? Thank you

2,614 次查看
bosnian_beast
Contributor III

I want to create two versions of the screen in gui guider, one for horizontal, one for vertical placement. I just need the widgets to rotate, not the screen, not to do any lvgl coding, not to rotate display pixels, not to change the resolution, everything stays the same, only widgets rotate. I also need it to be a what-you-see-is-what-you-get, I don't want to guess how it will look like by manually inputting angles, x,y points etc... without seeing how it looks like beforehand.  Take a look at the options screen for example:

 

 

Untitled.png