[TASK] Replace topbar TYPO3 logo png file with svg file 03/50403/2
authorJan Helke <typo3@helke.de>
Thu, 27 Oct 2016 11:44:06 +0000 (13:44 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 27 Oct 2016 12:19:19 +0000 (14:19 +0200)
Releases: master
Resolves: #78463
Change-Id: I59aad51a22d1ae0af5e7d99e92f06be850e84e14
Reviewed-on: https://review.typo3.org/50403
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Steiger <typo3@andreassteiger.de>
Tested-by: Andreas Steiger <typo3@andreassteiger.de>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Resources/Public/Images/typo3-topbar@2x.png [deleted file]
typo3/sysext/backend/Resources/Public/Images/typo3_logo_orange.svg [new file with mode: 0644]
typo3/sysext/workspaces/Classes/Controller/PreviewController.php

index 9844a7c..312dd3b 100644 (file)
@@ -280,14 +280,17 @@ class BackendController
         }
         // if no custom logo was set or the path is invalid, use the original one
         if (empty($logoPath)) {
         }
         // if no custom logo was set or the path is invalid, use the original one
         if (empty($logoPath)) {
-            $logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3-topbar@2x.png');
-        }
-        list($logoWidth, $logoHeight) = @getimagesize($logoPath);
+            $logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3_logo_orange.svg');
+            $logoWidth = 22;
+            $logoHeight = 22;
+        } else {
+            list($logoWidth, $logoHeight) = @getimagesize($logoPath);
 
 
-        // High-resolution?
-        if (strpos($logoPath, '@2x.') !== false) {
-            $logoWidth = $logoWidth/2;
-            $logoHeight = $logoHeight/2;
+            // High-resolution?
+            if (strpos($logoPath, '@2x.') !== false) {
+                $logoWidth /= 2;
+                $logoHeight /= 2;
+            }
         }
 
         $view->assign('logoUrl', PathUtility::getAbsoluteWebPath($logoPath));
         }
 
         $view->assign('logoUrl', PathUtility::getAbsoluteWebPath($logoPath));
diff --git a/typo3/sysext/backend/Resources/Public/Images/typo3-topbar@2x.png b/typo3/sysext/backend/Resources/Public/Images/typo3-topbar@2x.png
deleted file mode 100644 (file)
index 05f7a77..0000000
Binary files a/typo3/sysext/backend/Resources/Public/Images/typo3-topbar@2x.png and /dev/null differ
diff --git a/typo3/sysext/backend/Resources/Public/Images/typo3_logo_orange.svg b/typo3/sysext/backend/Resources/Public/Images/typo3_logo_orange.svg
new file mode 100644 (file)
index 0000000..d853637
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="83.098" height="84.172" viewBox="43.201 42.122 83.098 84.172">
+  <path fill="#FF8700" d="M106.074 100.128c-1.247.368-2.242.506-3.549.506-10.689 0-26.389-37.359-26.389-49.793 0-4.577 1.083-6.104 2.613-7.415-13.084 1.527-28.784 6.329-33.806 12.433-1.085 1.529-1.743 3.926-1.743 6.98 0 19.41 20.718 63.455 35.332 63.455 6.765.001 18.164-11.112 27.542-26.166M99.25 42.122c13.52 0 27.049 2.18 27.049 9.812 0 15.483-9.819 34.246-14.832 34.246-8.942 0-20.065-24.867-20.065-37.301.001-5.67 2.181-6.757 7.848-6.757"/>
+</svg>
index cb34339..9366731 100644 (file)
@@ -158,12 +158,9 @@ class PreviewController extends AbstractController
 
         $backendUser->setAndSaveSessionData('workspaces.backend_domain', GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
 
 
         $backendUser->setAndSaveSessionData('workspaces.backend_domain', GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
 
-        $logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3-topbar@2x.png');
-        list($logoWidth, $logoHeight) = @getimagesize($logoPath);
-
-        // High-resolution?
-        $logoWidth = $logoWidth/2;
-        $logoHeight = $logoHeight/2;
+        $logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3_logo_orange.svg');
+        $logoWidth = 22;
+        $logoHeight = 22;
 
         $this->view->assignMultiple([
             'logoUrl' => PathUtility::getAbsoluteWebPath($logoPath),
 
         $this->view->assignMultiple([
             'logoUrl' => PathUtility::getAbsoluteWebPath($logoPath),