mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
Reference Document: https://docs.google.com/document/d/1zvmKDfdgVgL-QX2W4nKfgoeG_69YDF0AsLerIzL3rPE/edit?usp=sharing Explainer: https://docs.google.com/document/d/1TmvbZuJR4fHuViE0X23y_1kUT43qt98mdj5GZxWf_W0/edit Bug: 1093229 Change-Id: I0a8d049bd564a5ba547466067a12185565af7820 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2305613 Commit-Queue: Michael Liao <michael.liao@microsoft.com> Reviewed-by: Paul Lewis <aerotwist@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Reviewed-by: Changhao Han <changhaohan@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Songtao Xia <soxia@microsoft.com> Reviewed-by: Tony Ross <tross@microsoft.com> Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Adding new icons:
-
Out of a spritesheet (if you have a separately saved icon already go to 2.):
- Open a spritesheet with the icon of interest, like
largeIcons.svgin Inkscape. - Make sure it's the
src/version of the spritesheet. - Copy-paste the icon to a new page. Make sure it preserved its original size and aspect ratio, and isn't otherwise altered.
- Set the size of the page to match the icon. You may use Inkscape's Edit>Resize Page to Selection command to accomplish this.
- If you chose to include padding in the icon, make sure the icon is centered within the page.
- Save the icon with
_icon.svgsuffix. For instancelist_icon.svg.
- Open a spritesheet with the icon of interest, like
-
Add respective entries to
.gnifiles.- Update the
devtols_image_fileslist indevtools_image_files.gni. - Update the
grd_files_release_sourceslist indevtools_grd_files.gni.
- Update the
-
Optimize:
./scripts/optimize_svg_images.py.
-
Use Icon component in the DevTools front-end:
- Visit https://docs.google.com/document/d/1EA--IokG6YW51y7unS8dIKUx6EtyjETT0uglmvIpfsg/edit#heading=h.xgjl2srtytjt for more information on that.