From 97b928e9d5a596b029f43895f887cdeea85b7fa3 Mon Sep 17 00:00:00 2001 From: Eric Chavaillaz Date: Sun, 21 Sep 2014 13:51:40 +0200 Subject: [PATCH] [BUGFIX] Invalid rendering of high resolution icons in lists When using high resolution icons (png) in backend modules (32x32) and this module can be enabled/disabled in the be_groups/be_users records, the icon is displayed bigger than desired. This patch introduces width and height attributes in the "getIconHtml" method to prevent this visual bug. Resolves: #61656 Releases: master, 6.2 Change-Id: Ida484f794ab632eef8c693e41ee2b5f5d26c5e8f Reviewed-on: http://review.typo3.org/32812 Reviewed-by: Xavier Perseguers Tested-by: Xavier Perseguers Reviewed-by: Markus Klein Tested-by: Markus Klein --- typo3/sysext/backend/Classes/Form/FormEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/backend/Classes/Form/FormEngine.php b/typo3/sysext/backend/Classes/Form/FormEngine.php index 84bc4b0b707a..97b5ed66332d 100644 --- a/typo3/sysext/backend/Classes/Form/FormEngine.php +++ b/typo3/sysext/backend/Classes/Form/FormEngine.php @@ -4803,9 +4803,9 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) { protected function getIconHtml($icon, $alt = '', $title = '') { $iconArray = $this->getIcon($icon); if (!empty($iconArray[0]) && is_file(GeneralUtility::resolveBackPath(PATH_typo3 . PATH_typo3_mod . $iconArray[0]))) { - return '' . $alt . ''; + return '' . $alt . ''; } else { - return IconUtility::getSpriteIcon($icon, array('alt' => $alt, 'title' => $title)); + return IconUtility::getSpriteIcon($icon, array('alt' => $alt, 'title' => $title, 'width' => 16, 'height' => 16)); } } -- 2.20.1