1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-21 22:32:41 +01:00

Add Conpherence sprites.

Summary: Let's see if I did this right. This adds on and off state icons (1 and 2x) for conpherence. I think I need to tweak and add more CSS to have the off hover state be the on icon. Will check.

Test Plan: spritegen

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2400

Differential Revision: https://secure.phabricator.com/D4709
This commit is contained in:
Chad Little 2013-01-28 15:56:29 -08:00
parent add39effb9
commit 93eac1f9d3
32 changed files with 175 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,005 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,71 @@
{
"version" : 1,
"sprites" : {
"conpher_calendar_off" : {
"name" : "conpher_calendar_off",
"rule" : "conpher_calendar_off",
"hash" : "a8228ab90fd90f4c2500d9285179bf26"
},
"conpher_calendar_on" : {
"name" : "conpher_calendar_on",
"rule" : "conpher_calendar_on",
"hash" : "931243bc3c414782ddb2d1d9607908ba"
},
"conpher_files_off" : {
"name" : "conpher_files_off",
"rule" : "conpher_files_off",
"hash" : "de1aee01b9b47b354e6ac280ae68bae1"
},
"conpher_files_on" : {
"name" : "conpher_files_on",
"rule" : "conpher_files_on",
"hash" : "9ccbbd5e86fd4ec87a11aee0c9ec8c60"
},
"conpher_list_off" : {
"name" : "conpher_list_off",
"rule" : "conpher_list_off",
"hash" : "2611311d0c2aec04416433be74d3a30e"
},
"conpher_list_on" : {
"name" : "conpher_list_on",
"rule" : "conpher_list_on",
"hash" : "cee6de0301c84b0d195282642642afa0"
},
"conpher_more_off" : {
"name" : "conpher_more_off",
"rule" : "conpher_more_off",
"hash" : "3b7099bdde20a13864b48552b11e92c3"
},
"conpher_more_on" : {
"name" : "conpher_more_on",
"rule" : "conpher_more_on",
"hash" : "b146f0cff9c2e5f0b57f7ebcfe0704d3"
},
"conpher_people_off" : {
"name" : "conpher_people_off",
"rule" : "conpher_people_off",
"hash" : "641a6a21aa32a12416e85caf8a22e340"
},
"conpher_people_on" : {
"name" : "conpher_people_on",
"rule" : "conpher_people_on",
"hash" : "f13745fd7036564eefb1c0ebc3502a92"
},
"conpher_settings_off" : {
"name" : "conpher_settings_off",
"rule" : "conpher_settings_off",
"hash" : "aa9ab000d9e33e3c50c2fe70367f30b4"
},
"conpher_settings_on" : {
"name" : "conpher_settings_on",
"rule" : "conpher_settings_on",
"hash" : "a5fe22965997f9559800ca7db5ea32c8"
}
},
"scales" : [
1,
2
],
"header" : "\/**\n * @provides sprite-conpher-css\n * @generated\n *\/\n\n.sprite-conpher {\n background-image: url(\/rsrc\/image\/sprite-conpher.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-conpher {\n background-image: url(\/rsrc\/image\/sprite-conpher-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"type" : "standard"
}

View file

@ -30,6 +30,7 @@ $sheets = array(
'icon' => $generator->buildIconSheet(),
'menu' => $generator->buildMenuSheet(),
'apps' => $generator->buildAppsSheet(),
'conph' => $generator->buildConpherenceSheet(),
'apps-large' => $generator->buildAppsLargeSheet(),
// TODO: @chad: should we actually remove this?
// 'apps-xlarge' => $generator->buildAppsXLargeSheet(),

View file

@ -176,6 +176,42 @@ final class CeleritySpriteGenerator {
return $sheet;
}
public function buildConpherenceSheet() {
$icons = $this->getDirectoryList('conpher_1x');
$scales = array(
'1x' => 1,
'2x' => 2,
);
$template = id(new PhutilSprite())
->setSourceSize(32, 32);
$sprites = array();
foreach ($icons as $icon) {
$color = preg_match('/_on/', $icon) ? 'on' : 'off';
$prefix = 'conpher_';
$sprite = id(clone $template)
->setName($prefix.$icon);
$sprite->setTargetCSS($prefix.$icon);
foreach ($scales as $scale_key => $scale) {
$path = $this->getPath($prefix.$scale_key.'/'.$icon.'.png');
$sprite->setSourceFile($path, $scale);
}
$sprites[] = $sprite;
}
$sheet = $this->buildSheet('conpher', true);
$sheet->setScales($scales);
foreach ($sprites as $sprite) {
$sheet->addSprite($sprite);
}
return $sheet;
}
public function buildGradientSheet() {
$gradients = $this->getDirectoryList('gradients');

View file

@ -0,0 +1,67 @@
/**
* @provides sprite-conpher-css
* @generated
*/
.sprite-conpher {
background-image: url(/rsrc/image/sprite-conpher.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-conpher {
background-image: url(/rsrc/image/sprite-conpher-X2.png);
background-size: 99px 132px;
}
}
conpher_calendar_off {
background-position: 0px 0px;
}
conpher_calendar_on {
background-position: -33px 0px;
}
conpher_files_off {
background-position: -66px 0px;
}
conpher_files_on {
background-position: 0px -33px;
}
conpher_list_off {
background-position: -33px -33px;
}
conpher_list_on {
background-position: -66px -33px;
}
conpher_more_off {
background-position: 0px -66px;
}
conpher_more_on {
background-position: -33px -66px;
}
conpher_people_off {
background-position: -66px -66px;
}
conpher_people_on {
background-position: 0px -99px;
}
conpher_settings_off {
background-position: -33px -99px;
}
conpher_settings_on {
background-position: -66px -99px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB