Changeset View
Changeset View
Standalone View
Standalone View
src/applications/celerity/CeleritySpriteGenerator.php
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | final class CeleritySpriteGenerator extends Phobject { | ||||
| public function buildTokenSheet() { | public function buildTokenSheet() { | ||||
| $icons = $this->getDirectoryList('tokens_1x'); | $icons = $this->getDirectoryList('tokens_1x'); | ||||
| $scales = array( | $scales = array( | ||||
| '1x' => 1, | '1x' => 1, | ||||
| '2x' => 2, | '2x' => 2, | ||||
| ); | ); | ||||
| $template = id(new PhutilSprite()) | $template = id(new PhutilSprite()) | ||||
| ->setSourceSize(16, 16); | ->setSourceSize(18, 18); | ||||
| $sprites = array(); | $sprites = array(); | ||||
| $prefix = 'tokens_'; | $prefix = 'tokens_'; | ||||
| foreach ($icons as $icon) { | foreach ($icons as $icon) { | ||||
| $sprite = id(clone $template) | $sprite = id(clone $template) | ||||
| ->setName('tokens-'.$icon) | ->setName('tokens-'.$icon) | ||||
| ->setTargetCSS('.tokens-'.$icon); | ->setTargetCSS('.tokens-'.$icon); | ||||
| ▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines | |||||