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
BIN
resources/sprite/conpher_1x/calendar_off.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
resources/sprite/conpher_1x/calendar_on.png
Normal file
After Width: | Height: | Size: 272 B |
BIN
resources/sprite/conpher_1x/files_off.png
Normal file
After Width: | Height: | Size: 886 B |
BIN
resources/sprite/conpher_1x/files_on.png
Normal file
After Width: | Height: | Size: 895 B |
BIN
resources/sprite/conpher_1x/list_off.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
resources/sprite/conpher_1x/list_on.png
Normal file
After Width: | Height: | Size: 199 B |
BIN
resources/sprite/conpher_1x/more_off.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
resources/sprite/conpher_1x/more_on.png
Normal file
After Width: | Height: | Size: 410 B |
BIN
resources/sprite/conpher_1x/people_off.png
Normal file
After Width: | Height: | Size: 1,005 B |
BIN
resources/sprite/conpher_1x/people_on.png
Normal file
After Width: | Height: | Size: 965 B |
BIN
resources/sprite/conpher_1x/settings_off.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
resources/sprite/conpher_1x/settings_on.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/sprite/conpher_2x/calendar_off.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
resources/sprite/conpher_2x/calendar_on.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
resources/sprite/conpher_2x/conversation_off.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/sprite/conpher_2x/conversation_on.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/sprite/conpher_2x/files_off.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/sprite/conpher_2x/files_on.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/sprite/conpher_2x/list_off.png
Normal file
After Width: | Height: | Size: 306 B |
BIN
resources/sprite/conpher_2x/list_on.png
Normal file
After Width: | Height: | Size: 295 B |
BIN
resources/sprite/conpher_2x/more_off.png
Normal file
After Width: | Height: | Size: 776 B |
BIN
resources/sprite/conpher_2x/more_on.png
Normal file
After Width: | Height: | Size: 923 B |
BIN
resources/sprite/conpher_2x/people_off.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/sprite/conpher_2x/people_on.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/conpher_2x/settings_off.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/sprite/conpher_2x/settings_on.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
71
resources/sprite/manifest/conph.json
Normal 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"
|
||||||
|
}
|
|
@ -30,6 +30,7 @@ $sheets = array(
|
||||||
'icon' => $generator->buildIconSheet(),
|
'icon' => $generator->buildIconSheet(),
|
||||||
'menu' => $generator->buildMenuSheet(),
|
'menu' => $generator->buildMenuSheet(),
|
||||||
'apps' => $generator->buildAppsSheet(),
|
'apps' => $generator->buildAppsSheet(),
|
||||||
|
'conph' => $generator->buildConpherenceSheet(),
|
||||||
'apps-large' => $generator->buildAppsLargeSheet(),
|
'apps-large' => $generator->buildAppsLargeSheet(),
|
||||||
// TODO: @chad: should we actually remove this?
|
// TODO: @chad: should we actually remove this?
|
||||||
// 'apps-xlarge' => $generator->buildAppsXLargeSheet(),
|
// 'apps-xlarge' => $generator->buildAppsXLargeSheet(),
|
||||||
|
|
|
@ -176,6 +176,42 @@ final class CeleritySpriteGenerator {
|
||||||
return $sheet;
|
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() {
|
public function buildGradientSheet() {
|
||||||
$gradients = $this->getDirectoryList('gradients');
|
$gradients = $this->getDirectoryList('gradients');
|
||||||
|
|
||||||
|
|
67
webroot/rsrc/css/sprite-conph.css
Normal 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;
|
||||||
|
}
|
BIN
webroot/rsrc/image/sprite-conph-X2.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
webroot/rsrc/image/sprite-conph.png
Normal file
After Width: | Height: | Size: 5.4 KiB |