public static function colorizeAndRasterizeIcon($iconSet, $icon, $color, $dest, $scale, &$w, &$h) {
// Init directory
$color = ltrim($color, '#');
- $dirColorized = WS_ICONS . '/' . $iconSet . '/mobile/' . $color . '/';
+
+ $e = explode('-', $icon);
+ $nav = ($e[0] != 'share');
+
+ if ($nav) {
+ $dirColorized = WS_ICONS . '/' . $iconSet . '/mobile/' . $color . '/';
+ $svgRef = WS_ICONS . '/' . $iconSet . '/mobile/' . $icon . '.svg';
+ $svgColorized = $dirColorized . '/' . $icon . '.svg';
+ } else {
+ $dirColorized = WS_ICONS . '/share/' . $color;
+ $svgRef = WS_ICONS . '/share/' . $icon . '.svg';
+ $svgColorized = $dirColorized . '/' . $icon . '.svg';
+ }
if (!file_exists($dirColorized)) {
mkdir($dirColorized, 0777, true);
}
// SVG
- $svgRef = WS_ICONS . '/' . $iconSet . '/mobile/' . $icon . '.svg';
- $svgColorized = $dirColorized . '/' . $icon . '.svg';
if (!file_exists($svgColorized) || filemtime($svgColorized) <= filemtime($svgRef)) {
$svg = file_get_contents($svgRef);
'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI,
'help-fingers' => $couleurI, 'help-mouse' => $couleurI, 'nav-home' => $couleurI, 'nav-archives' => $couleurI, 'nav-map' => $couleurI,
'nav-tag' => $couleurI, 'nav-print' => $couleurI, 'nav-friend' => $couleurI,
- 'nav-facebook' => $couleurM, 'nav-twitter' => $couleurM, 'nav-email' => $couleurM);
+ 'share-facebook' => $couleurM, 'share-twitter' => $couleurM, 'share-email' => $couleurM, 'share-googleplus' => $couleurM, 'share-linkedin' => $couleurM, 'share-viadeo' => $couleurM);
$this->config->iconsDimensions = array();
foreach ($icons as $icon => $color) {
wsTools::colorizeAndRasterizeIcon($this->theme->parametres->iconSet, $icon, $color, $this->vdir . '/data/images/', 4, $w, $h);
+
$this->config->iconsDimensions[$icon] = array($w, $h);
}
return $res;