This should be an idempotent patch. The way to come up with this patch has been:
- Run the first script attached to the bug and pipe it to xclip, then paste it in color.rs
- Add the relevant #[derive] annotations and remove the color.mako.rs definition.
- Reorder the values to match the ColorID definition, on which some widget prefs and caching stuff relies on.
- Manually port some documentation from nsLookAndFeel.h
- Run rg 'eColorID_' | cut -d : -f 1 | sort | uniq >files
- Run the second script attached to the bug.
- Manually fix usage of LAST_COLOR (adding the End variant), and adding casts to integer as needed.
- Add an static assert so that people remember to update the prefs, rather than a comment on the definition :)