2025-02-12 11:46 AM
I was trying to build up a stm32g07 GUI project from scratch. But I encountered a distorted button displaying problem. It took me about 3 hours before I gave up, but when I accidentally changed the screen orientation, this problem was solved. I replicated the test, and I'm kind of sure it was a bug in DesignX, even if I changed the orientation back, it still worked. I tried to look for the difference in the generated code before and after I changed the screen orientation but saw nothing.
I hope someone can explain to me how this problem arose and was resolved at the code level.
Thanks.
____________________
Appendixes
2-It works the same on the simulator and the hardware:
3-I uploaded the project with git so it's easy to track the changes (ignore the typo, 'distorted'='distored')
2025-02-13 02:33 AM
2025-02-13 06:49 AM
Sorry for the confusion. Here I mean 'TouchGFX Designer'.
And I was using these versions:
TouchGFX -- 4.24.0
cubeIDE -- 1.16.0
cubeMX -- 6.13.0
2025-02-18 06:00 AM
Hello @Arthur_UW ,
I tried your project, and in your application.config the layout_rotation is 0 (Landscape), but the way the screen was configured in CubeMx is in Portrait mode dimensions.
So that's why when you run project things were mangled. In that case you should always configure the screen by using the native resolution of the screen it self in CubeMx (you may find it in your screen specs sheet) , as TouchGFX set the orientation by default to Landscape.
Best regards,