DescriptionDevTools: use chess-like icon positions
This patch:
- moves icons from {x, y, width, height} coordinates into
chess-like coordinates. Position 'a1' means bottom-left corner,
and position 'a8' means 1st column 8th row.
- removes spritesheet image sizes from inspectorCommon.css. This
turned out to be possible since icon's background/mask-image
always have default size of the image.
This solves multiple issues:
- it's easy to convert between icon coordinates and spritesheets.
Chess-like coordinate systems are embedded into SVGs:
http://imgur.com/a/YcSSs
- it discourages abusing of icon sizes - icon could occupy the
whole cell only
- resizing spritesheet is as easy as changing its size in inkscape
Performance-wise, this change doesn't impact time to create icon in
a noticeble way. Before this patch, creating all 107 icons was
taking ~3ms on my MacBook Pro 2015. With this patch, the time
didn't change.
BUG=700249
R=dgozman
Review-Url: https://codereview.chromium.org/2776893002
Cr-Commit-Position: refs/heads/master@{#459958}
Committed: https://chromium.googlesource.com/chromium/src/+/8c40265f143b45ecc7ddf49aedb363d6c7c70e69
Patch Set 1 #Patch Set 2 : remove unneeded assert #Patch Set 3 : add chess coordinates to svg #
Total comments: 2
Patch Set 4 : make row in formula zero-based #
Dependent Patchsets: Messages
Total messages: 16 (9 generated)
|