mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #58526 from nextcloud/fix/icon-ratio
fix(theming): Fix favicon and touchicon ratios
This commit is contained in:
commit
95e3dba34c
2 changed files with 4 additions and 7 deletions
|
|
@ -144,9 +144,8 @@ class IconBuilder {
|
|||
$y = $tmp->getImageHeight();
|
||||
$tmp->destroy();
|
||||
// set resolution for proper scaling
|
||||
$resX = (int)(72 * $size / $x);
|
||||
$resY = (int)(72 * $size / $y);
|
||||
$appIconFile->setResolution($resX, $resY);
|
||||
$res = (int)(72 * $size / max($x, $y));
|
||||
$appIconFile->setResolution($res, $res);
|
||||
$appIconFile->readImageBlob($svg);
|
||||
} else {
|
||||
// handle non-SVG images
|
||||
|
|
|
|||
|
|
@ -297,11 +297,9 @@ class IconBuilderTest extends TestCase {
|
|||
$x = $tmp->getImageWidth();
|
||||
$y = $tmp->getImageHeight();
|
||||
$tmp->destroy();
|
||||
// set resolution for proper scaling
|
||||
$resX = (int)(72 * $size / $x);
|
||||
$resY = (int)(72 * $size / $y);
|
||||
$res = (int)(72 * $size / max($x, $y));
|
||||
$appIconFile->setBackgroundColor(new \ImagickPixel('transparent'));
|
||||
$appIconFile->setResolution($resX, $resY);
|
||||
$appIconFile->setResolution($res, $res);
|
||||
$appIconFile->readImageBlob($svgContent);
|
||||
} else {
|
||||
$appIconFile->readImage($filePath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue