Skip to content

Commit 1ec35e9

Browse files
authored
Merge pull request #57656 from nextcloud/backport/57653/stable31
[stable31] fix(theming): Fix favicon and touchicon ratios
2 parents 1f72e7b + 7c637e3 commit 1ec35e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/theming/lib/IconBuilder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ public function renderAppIcon($app, $size) {
135135

136136
// convert svg to resized image
137137
$appIconFile = new Imagick();
138-
$resX = (int)(72 * $size / $x);
139-
$resY = (int)(72 * $size / $y);
140-
$appIconFile->setResolution($resX, $resY);
138+
$res = (int)(72 * $size / max($x, $y));
139+
$appIconFile->setResolution($res, $res);
141140
$appIconFile->setBackgroundColor(new ImagickPixel('transparent'));
142141
$appIconFile->readImageBlob($svg);
143142

0 commit comments

Comments
 (0)