1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00

Add ButtonBar icons

Summary: Adds an icon set for icons on button bars.

Test Plan: photoshop

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4394

Differential Revision: https://secure.phabricator.com/D8170
This commit is contained in:
Chad Little 2014-02-09 10:22:12 -08:00
parent 174d38fbe3
commit eec593e313
21 changed files with 130 additions and 0 deletions

View file

@ -151,6 +151,7 @@ return array(
'rsrc/css/sprite-apps-large.css' => '0a453d4b',
'rsrc/css/sprite-apps-xlarge.css' => 'db66c878',
'rsrc/css/sprite-apps.css' => 'c3857e4e',
'rsrc/css/sprite-buttonbar.css' => 'bbec51ec',
'rsrc/css/sprite-conpherence.css' => '084b1f13',
'rsrc/css/sprite-docs.css' => '7ea4927e',
'rsrc/css/sprite-gradient.css' => 'a10def53',
@ -305,6 +306,8 @@ return array(
'rsrc/image/sprite-apps-large.png' => 'b0aa7d64',
'rsrc/image/sprite-apps-xlarge.png' => 'a751a580',
'rsrc/image/sprite-apps.png' => '35052ada',
'rsrc/image/sprite-buttonbar-X2.png' => '36fcc19d',
'rsrc/image/sprite-buttonbar.png' => 'e488cf8d',
'rsrc/image/sprite-conpherence-X2.png' => '5ed80fb0',
'rsrc/image/sprite-conpherence.png' => '7146f76f',
'rsrc/image/sprite-docs-X2.png' => '520858fa',
@ -778,6 +781,7 @@ return array(
'sprite-apps-css' => 'c3857e4e',
'sprite-apps-large-css' => '0a453d4b',
'sprite-apps-xlarge-css' => 'db66c878',
'sprite-buttonbar-css' => 'bbec51ec',
'sprite-conpherence-css' => '084b1f13',
'sprite-docs-css' => '7ea4927e',
'sprite-gradient-css' => 'a10def53',

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -0,0 +1,46 @@
{
"version" : 1,
"sprites" : {
"buttonbar-calendar" : {
"name" : "buttonbar-calendar",
"rule" : ".buttonbar-calendar",
"hash" : "51aed380faf290dab35d736a92d15aba"
},
"buttonbar-chevron-left" : {
"name" : "buttonbar-chevron-left",
"rule" : ".buttonbar-chevron-left",
"hash" : "24e52c724c85eb313e19ecd222be73b5"
},
"buttonbar-chevron-right" : {
"name" : "buttonbar-chevron-right",
"rule" : ".buttonbar-chevron-right",
"hash" : "9bbe40f752ee650646021b348b2971a9"
},
"buttonbar-cog" : {
"name" : "buttonbar-cog",
"rule" : ".buttonbar-cog",
"hash" : "1c816c27b8d7b6bffe5e32ba716e5930"
},
"buttonbar-home" : {
"name" : "buttonbar-home",
"rule" : ".buttonbar-home",
"hash" : "3ab3bfd5bf3c1ba0a422c200a70578d5"
},
"buttonbar-pencil" : {
"name" : "buttonbar-pencil",
"rule" : ".buttonbar-pencil",
"hash" : "17d42be118aa21bc154b3f7da3faf7cb"
},
"buttonbar-time" : {
"name" : "buttonbar-time",
"rule" : ".buttonbar-time",
"hash" : "1355aa26ecd63e76a59352aba95e54ad"
}
},
"scales" : [
1,
2
],
"header" : "\/**\n * @provides sprite-buttonbar-css\n * @generated\n *\/\n\n.sprite-buttonbar {\n background-image: url(\/rsrc\/image\/sprite-buttonbar.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5) {\n .sprite-buttonbar {\n background-image: url(\/rsrc\/image\/sprite-buttonbar-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"type" : "standard"
}

View file

@ -36,6 +36,7 @@ $sheets = array(
'apps-large' => $generator->buildAppsLargeSheet(),
'payments' => $generator->buildPaymentsSheet(),
'tokens' => $generator->buildTokenSheet(),
'buttonbar' => $generator->buildButtonBarSheet(),
'docs' => $generator->buildDocsSheet(),
'gradient' => $generator->buildGradientSheet(),
'main-header' => $generator->buildMainHeaderSheet(),

View file

@ -343,6 +343,38 @@ final class CeleritySpriteGenerator {
return $sheet;
}
public function buildButtonBarSheet() {
$icons = $this->getDirectoryList('button_bar_1x');
$scales = array(
'1x' => 1,
'2x' => 2,
);
$template = id(new PhutilSprite())
->setSourceSize(14, 14);
$sprites = array();
$prefix = 'button_bar_';
foreach ($icons as $icon) {
$sprite = id(clone $template)
->setName('buttonbar-'.$icon)
->setTargetCSS('.buttonbar-'.$icon);
foreach ($scales as $scale_key => $scale) {
$path = $this->getPath($prefix.$scale_key.'/'.$icon.'.png');
$sprite->setSourceFile($path, $scale);
}
$sprites[] = $sprite;
}
$sheet = $this->buildSheet('buttonbar', true);
$sheet->setScales($scales);
foreach ($sprites as $sprite) {
$sheet->addSprite($sprite);
}
return $sheet;
}
public function buildProjectsSheet() {
$icons = $this->getDirectoryList('projects_1x');
$scales = array(

View file

@ -0,0 +1,47 @@
/**
* @provides sprite-buttonbar-css
* @generated
*/
.sprite-buttonbar {
background-image: url(/rsrc/image/sprite-buttonbar.png);
background-repeat: no-repeat;
}
@media
only screen and (min-device-pixel-ratio: 1.5),
only screen and (-webkit-min-device-pixel-ratio: 1.5) {
.sprite-buttonbar {
background-image: url(/rsrc/image/sprite-buttonbar-X2.png);
background-size: 45px 45px;
}
}
.buttonbar-calendar {
background-position: 0px 0px;
}
.buttonbar-chevron-left {
background-position: -15px 0px;
}
.buttonbar-chevron-right {
background-position: -30px 0px;
}
.buttonbar-cog {
background-position: 0px -15px;
}
.buttonbar-home {
background-position: -15px -15px;
}
.buttonbar-pencil {
background-position: 0px -30px;
}
.buttonbar-time {
background-position: -15px -30px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B