From 1b9ac1e8d1da761ce13715f21eebf57a852f02a8 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 24 Jan 2013 10:40:39 +0000 Subject: [PATCH] --- inc/ws/Util/class.ws.tools.php | 16 +++++++++++++--- inc/ws/Util/html5/class.ws.html5.compiler.php | 3 ++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/inc/ws/Util/class.ws.tools.php b/inc/ws/Util/class.ws.tools.php index 68634bae3..06c6de7da 100644 --- a/inc/ws/Util/class.ws.tools.php +++ b/inc/ws/Util/class.ws.tools.php @@ -25,15 +25,25 @@ class wsTools { 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); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index bb5a9544c..ef256ca6c 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -750,12 +750,13 @@ class wsHTML5Compiler { '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; -- 2.39.5