Generate an icon sprite map with new sprites and 2x retina graphics
Summary:
- The filesystem is now the authority for which sprites are available. If you add new icons, the generation process will pick them up.
- I broke out icon generation and added retina support. App icon generation still uses the old method.
- Update ActionList and RemarkupControl to use the new sheet.
- Use white icons on hover.
- Also fixed a couple of minor issues with some stuff in Firefox/Chrome.
Test Plan:
{F25750}
{F25751}
{F25752}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2013
Differential Revision: https://secure.phabricator.com/D4027
This commit is contained in:
@@ -27,7 +27,8 @@ if (!$srcroot) {
|
||||
"You must specify a source directory with '--source'.");
|
||||
}
|
||||
|
||||
$webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/rsrc';
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
$webroot = $root.'/webroot/rsrc';
|
||||
$webroot = Filesystem::readablePath($webroot);
|
||||
|
||||
function glx($x) {
|
||||
@@ -192,10 +193,12 @@ $sheet->generateCSS($webroot.'/css/autosprite.css');
|
||||
|
||||
$generator = new CeleritySpriteGenerator();
|
||||
|
||||
$icon_sheet = $generator->buildIconSheet();
|
||||
$icon_sheet->setScales(array(1, 2));
|
||||
$icon_sheet->generateImage($webroot.'/image/sprite-icon.png', 1);
|
||||
$icon_sheet->generateImage($webroot.'/image/sprite-icon-X2.png', 2);
|
||||
$icon_sheet->generateCSS($webroot.'/css/sprite-icon.css');
|
||||
$generator
|
||||
->buildIconSheet()
|
||||
->setScales(array(1, 2))
|
||||
->generateImage($webroot.'/image/sprite-icon.png', 1)
|
||||
->generateImage($webroot.'/image/sprite-icon-X2.png', 2)
|
||||
->generateCSS($webroot.'/css/sprite-icon.css')
|
||||
->generateManifest($root.'/resources/sprite/manifest/icon.json');
|
||||
|
||||
echo "Done.\n";
|
||||
|
||||
Reference in New Issue
Block a user