mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 06:04:55 +08:00
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1099211 To improve color contrast of the drag handles and to reduce file size some PNG icons are replaced by SVG files. Before: https://imgur.com/a/23KY36e After: https://imgur.com/a/RvK3mHe Change-Id: Iad71e4081ebe2ba2151dc6a0b2d0e1a8e00ac449 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2375194 Commit-Queue: Peter Müller <petermueller@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org>
Adding new icons
- Use Inkscape 0.92 or newer.
- Choose an existing spritesheet, like
largeIcons.svgto add the icon to.
- Make sure to edit the
src/version of the svg!
- Open that file with Inkscape and import the new SVG into the document
- Place in an open spot, and use guides to scale the icon to a good size, relative to other icons
- Any straight lines should be snapped to the closest pixel value.
- Use the
Edit paths by nodestool (F2) to edit the path directly. - Tweak the X, Y values at the top to be integers.
- Use the
- Optimize SVGs:
./scripts/optimize_svg_images.py
- In
ui/Icon.jsadd an entry inUI.Icon.Descriptors.- Look at the spritesheet's axes to identify the correct grid position.
- You may want to regenerate devtools resources:
ninja -C ~/chromium/src/out/Release/ devtools_frontend_resources