2025-03-23 11:13 AM
Hi all,
For my GUI I need several circle and box progress widgets in different sizes that have a transparent background, e.g. only showing the actual progress "line" and nothing else. So far I achieved this by simply choosing a transparent PNG as background image and that works fine. However, due to the many widgets and sizes I use quite a lot of transparent PNGs which start to add up in flash size.
Having PNGs using space for practically not displaying anything feels wrong, but It seems like the progress widgets only can take images as backgrounds and actually do need an image (there is obvious option to leave it blank).
Is there a more flash space efficient way to achieve circle progress and boxes with transparent (or no) background?
Thanks in advance!
Sascha
Solved! Go to Solution.
2025-03-24 3:08 AM - edited 2025-03-24 3:11 AM
Hello @SaschaK ,
In the Image tab of TouchGFX Designer, you can choose to compress your assets:
Since you are using fully transparent background, the compression will be very effective!
Another way of achieving your desired result would be to create a new class inheriting from the progress widget class and to modify it to not have a background image.
If this comment answers your question, I invite you to select it as "best answer".
Regards,
2025-03-23 11:26 AM
Most GUI libraries, such as LVGL (LittlevGL), LVGL (LVGL), or TFT_eSPI, allow you to draw shapes programmatically using their API. You can draw the circular progress using arc drawing functions.
2025-03-23 12:19 PM
That is true, just thought I could take an easier approach with the existing progress widgets. Seems like an unnecessary feature to need a background picture.
2025-03-24 3:08 AM - edited 2025-03-24 3:11 AM
Hello @SaschaK ,
In the Image tab of TouchGFX Designer, you can choose to compress your assets:
Since you are using fully transparent background, the compression will be very effective!
Another way of achieving your desired result would be to create a new class inheriting from the progress widget class and to modify it to not have a background image.
If this comment answers your question, I invite you to select it as "best answer".
Regards,
2025-03-24 1:52 PM
Hi @GaetanGodart,
thanks for the tip with the compression. That made a huge impact. All the transparent PNGs have been reduced down to 0.5-5% of their original size! I am more than happy with that result.
Just out of interest, in order to modify the existing widget, is the source code openly available somewhere?
Regards
Sascha
2025-03-25 2:02 AM
Hello @SaschaK ,
Not all of it, but the widgets are.
You can find them in a TouchGFX project folder here : ProjectName\Appli\Middlewares\ST\touchgfx\framework
Regards,