Skip to content

Conversation

@JimB40
Copy link
Collaborator

@JimB40 JimB40 commented Nov 10, 2025

This PR

  • integrates Figma as source for SVG graphics
  • automated PNG build for color LCD radios via covert-gfx.sh

Summary of changes:

  1. changed img-src files names & folder structure
  • files follows naming <bmp_|mask_><type_>.svg scheme that follows Figma UI Design scheme
  • bmp_ & mask_ prefix defines PNG type
  • no subfolders to simplify PNG generation & review
  • all SVG vector sources simplified end re-exported to img-src
  1. Replaced PNG
  • PNGs now have new names
  • unused PNGs are removed
  • conversion done using rsvg-convert for smaller size
  1. Modified CMakeList.txt
  • simplified
  1. Modified *.cpp
  • all *.cpp with *.lbm references are updated to reflect naming change
  • _BuiltinIcon names left untouched to avoid conflicts (lots of changes in code)
  1. tools script to convert SVG to PNG
  • changed script name to convert-gfx.sh
  • added --resvg param to force using resvg insted of rsvg-convert (testing)

Other PRs @pfeerick

@JimB40
Copy link
Collaborator Author

JimB40 commented Nov 10, 2025

Figma Integration

Screenshot 2025-11-10 at 06 46 14
  • left > Design window
  • right > Export SVG window

Any changes in Design window are automatically refleced in Export SVG window that converts graphic to specified type (normal PNG or mask PNG)

@JimB40 JimB40 changed the title Main change & clean up SVG & PNG for color LCD radio - change & clean up Nov 10, 2025
@JimB40 JimB40 force-pushed the radio-gfx-cleanup branch 2 times, most recently from 318205f to dca4592 Compare November 28, 2025 10:30
@JimB40 JimB40 requested a review from pfeerick November 28, 2025 10:54
@pfeerick pfeerick self-assigned this Dec 21, 2025
@pfeerick
Copy link
Member

pfeerick commented Jan 7, 2026

Ok, so finally looking at this @JimB40 🤣

I think you had doubled up on the CSV/script file... I think tools/convert-gfx.sh and tools/convert-gfx-list.csv were the old files? With tools/png-radio-fw.sh and tools/png_radio_fw_list.csv being the new?

I've rebased this to make it merge-ready again (and hopefully didn't break something), removed those extra files, I then run --update which updated the CSV (looks like it had old file names/paths), and --build which generated smaller versions of several images.

If everything looks ok to you, should be right to merge. If that old script was just my earlier one modified, don't think there is any need to keep that... better to not add two scripts doing basically the same job - any changes needed can be made to yours as time goes on ;)

@pfeerick pfeerick added color Related generally to color LCD radios house keeping 🧹 Cleanup of code and house keeping labels Jan 7, 2026
@pfeerick pfeerick added this to the 3.0 milestone Jan 7, 2026
@JimB40
Copy link
Collaborator Author

JimB40 commented Jan 12, 2026

Hey thx.
Actually the other way around tools/convert-gfx.sh and tools/convert-gfx-list.csv are proper (newer)
tools/convert-gfx-list.csv includes last modified time stamp column

Hasn't noticed I left png-radio-fw.sh & png_radio_fw_list.csv

@pfeerick pfeerick changed the title SVG & PNG for color LCD radio - change & clean up chore(color): conversion helper tool and file cleanup Jan 13, 2026
@pfeerick
Copy link
Member

pfeerick commented Jan 13, 2026

Thanks for that. Yes, my bad, the png_radio_fw just had some things convert_gfx, didn't, so added that in, and changed it to a Python script as it was already a bit long for a shell script (plus python lets you do a lot of platform-agnostic stuff in an easy to maintain manner).

It now also (among other things I probably forgot):

  • has nicer UI with progress bars and elapsed times 😁
  • verbose flag if you really need the file lists (--verbose)
  • checks if there are any orphaned PNG files when validating (validate png, validate all)
  • validation will now also tell you if there is an SVG that isn't in the CSV file (validate svg, validate all)
  • allows you to delete PNG files that no longer have a matching SVG, and optionally SVG files not referenced the CSV (cleanup, cleanup --include-svg)
  • allows for a dry run so you can see if any changes would be made by make or cleanup (--dry-run)
  • allows you to update the CSV with new SVGs (update-list)

I'll stop fiddling with it now, and we can add to it more and make changes as time progresses.

@pfeerick
Copy link
Member

pfeerick commented Jan 13, 2026

_BuiltinIcon names left untouched to avoid conflicts (lots of changes in code)

If you really want to make changes, you can do just

https://github.com/JimB40/edgetx/blob/ad9ffaa482dc622acaa1b7556ec3354b323b6b9c/radio/src/gui/colorlcd/bitmaps.h#L26-L147

and

https://github.com/JimB40/edgetx/blob/ad9ffaa482dc622acaa1b7556ec3354b323b6b9c/radio/src/gui/colorlcd/bitmaps.cpp#L405-L523

(or technically, just the second, with respect to the first - see the note about keeping them in the same order)

and I can probably figure out a not so painful way to do the rest (in anoher PR - let's keep this specific to the graphics and conversion helper).

JimB40 and others added 13 commits January 21, 2026 02:50
1. changed img-src files names & folder structure
- files follows naming <bmp_|mask_><type_><name>.svg scheme that follows Figma UI Design scheme
- bmp_ & mask_ prefix defines PNG type
- no subfolders to simplify PNG generation & review
- all SVG vector sources simplified end re-exported to img-src

2. Replaced PNG
- PNGs now have new names
- unused PNGs are removed
- conversion done using rsvg-convert for smaller size

3. Modified CMakeList.txt
- simplified

4. Modified *.cpp
- all *.cpp with *.lbm references are updated to reflect naming change
- _BuiltinIcon names left untouched to avoid conflicts (lots of changes in code)

5. tools script to convert SVG to PNG
- changed name to convert-gfx
- added --resvg param to force using resvg insted of rsvg-convert (testing)
1. add missing Favourite PNGs for EdgeTX#6753

2. added --update parameter to script
- CSV now keeps track of SVG modification date
- running ./convert-gfx.sh --make all --update  will only re-genarate PNGs for SVG s with newer modification date that the one in CSV
This reverts commit 3c30b4c and deletes the other two scripts instead.
OS agnostic and easier to maintain as the script gets more complex
Was going to add it during another PR, but here is as good as any place.
Also remove ANSI formatting in preference to rich formatting and duration
Also de-duplcate CSV handling and minor cleanups
… output

Check for orphaned PNGs when validating rather than needing to use cleanup in `--dry-run` mode. SVGs are already checked against CSV so nothing more is needed there.
Also turn off rich's syntax highlighting as this was triggering number and keyword highlighting.
@pfeerick pfeerick merged commit a7f0bac into EdgeTX:main Jan 21, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

color Related generally to color LCD radios house keeping 🧹 Cleanup of code and house keeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants