]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6437 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2023 13:52:32 +0000 (15:52 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2023 13:52:32 +0000 (15:52 +0200)
app/Fluidbook/Compiler/Compiler.php

index 3db3351020558668b741a7b12eb4feab20e4ffaf..f8db245471f613aaca802727b40475301c755da4 100644 (file)
@@ -1288,7 +1288,7 @@ class Compiler extends Base implements CompilerInterface
     {
         //dd($this->themeAsset('afterSearch'));
         if ($afterSearch = $this->themeAsset('afterSearch')) {
-            $this->vdir->copy($afterSearch->getPathname(), 'data/images/' . $afterSearch->getFilename());
+            $this->vdir->copy(SVGTools::optimizeSVG($afterSearch->getPathname()), 'data/images/' . $afterSearch->getFilename());
         }
         if ($this->fluidbookSettings->externalArchives != '') {
             $this->addFilesInfos('archives', $this->wdir . '/' . $this->fluidbookSettings->externalArchives);
@@ -1905,6 +1905,13 @@ class Compiler extends Base implements CompilerInterface
 
         $this->lessVariables['thumb-height'] = $thumbh . 'px';
 
+        # Aftersearch
+        if ($afterSearch = $this->themeAsset('afterSearch')) {
+            $dim = Image::getimagesize($afterSearch);
+            $this->lessVariables['aftersearch-width'] = $dim[0].'px';
+            $this->lessVariables['aftersearch-height'] = $dim[1].'px';
+        }
+
         #tooltip
         $this->lessVariables['tooltip-background'] = Color::colorToCSS($this->themeSettings->tooltipBackColor);
         $this->lessVariables['tooltip-color'] = Color::colorToCSS($this->themeSettings->tooltipTextColor);