Files
react-native-devtools-frontend/front_end/Images
Peter Müller 661b3a4411 Device preview: replace PNG icons with SVGs
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>
2020-08-26 17:51:53 +00:00
..
2020-08-26 12:00:52 +00:00
2020-07-16 10:18:25 +00:00
2019-06-10 23:19:12 +00:00
2019-06-10 23:19:12 +00:00
2019-06-10 23:19:12 +00:00
2020-08-26 12:00:52 +00:00
2020-05-18 15:59:12 +00:00
2019-06-10 23:19:12 +00:00
2019-06-10 23:19:12 +00:00

Adding new icons

  1. Use Inkscape 0.92 or newer.
  2. Choose an existing spritesheet, like largeIcons.svg to add the icon to.
  • Make sure to edit the src/ version of the svg!
  1. Open that file with Inkscape and import the new SVG into the document
  2. Place in an open spot, and use guides to scale the icon to a good size, relative to other icons
  3. Any straight lines should be snapped to the closest pixel value.
    • Use the Edit paths by nodes tool (F2) to edit the path directly.
    • Tweak the X, Y values at the top to be integers.
  4. Optimize SVGs:
  • ./scripts/optimize_svg_images.py
  1. In ui/Icon.js add an entry in UI.Icon.Descriptors.
    • Look at the spritesheet's axes to identify the correct grid position.
  2. You may want to regenerate devtools resources:
    • ninja -C ~/chromium/src/out/Release/ devtools_frontend_resources