[TASK] Replace module icons with IconFactory 10/43410/4
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 18 Sep 2015 07:49:14 +0000 (09:49 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 18 Sep 2015 09:35:59 +0000 (11:35 +0200)
Resolves: #69931
Releases: master
Change-Id: I2f8941ddfe82b4be474e91dc643d6cce8c9ba1c4
Reviewed-on: http://review.typo3.org/43410
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Build/Resources/Public/Less/TYPO3/_topbar.less
typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/t3skin/Resources/Public/Css/backend.css

index e7e4032..3a36ca4 100644 (file)
                        width: auto;
                        height: auto;
                }
+               > a .icon-size-default .icon-unify,
+               > a .icon-size-small .icon-unify {
+                       line-height: 16px;
+                       font-size: 16px;
+               }
        }
        .dropdown-toggle {
                position: relative;
                        font-weight: normal;
                }
        }
-}
\ No newline at end of file
+}
index bd806bd..9d7f773 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Backend\Domain\Repository\Module;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 
@@ -337,7 +339,8 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface {
 
                // add as a sprite icon
                if (!empty($moduleData['iconIdentifier'])) {
-                       $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($moduleData['iconIdentifier'], array('tagName' => 'i'));
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $icon = $iconFactory->getIcon($moduleData['iconIdentifier'])->render();
                } elseif (!empty($GLOBALS['LANG']->moduleLabels['tabs_images'][$moduleKey])) {
                        $imageReference = $GLOBALS['LANG']->moduleLabels['tabs_images'][$moduleKey];
                        $iconFileRelative = $this->getModuleIconRelative($imageReference);
index c7961ec..eb2ab7b 100644 (file)
@@ -1000,6 +1000,38 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                        )
                ),
 
+               // Modules
+               'module-web' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'file-o'
+                       )
+               ),
+               'module-file' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'image'
+                       )
+               ),
+               'module-tools' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'rocket'
+                       )
+               ),
+               'module-system' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'plug'
+                       )
+               ),
+               'module-help' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'question-circle'
+                       )
+               ),
+
                // Overlays
                'overlay-deleted' => array(
                        'provider' => SvgIconProvider::class,
index 5f91063..f6e2535 100644 (file)
@@ -13058,6 +13058,11 @@ iframe {
   width: auto;
   height: auto;
 }
+.typo3-topbar-navigation-items .dropdown > a .icon-size-default .icon-unify,
+.typo3-topbar-navigation-items .dropdown > a .icon-size-small .icon-unify {
+  line-height: 16px;
+  font-size: 16px;
+}
 .typo3-topbar-navigation-items .dropdown-toggle {
   position: relative;
 }