Theming: Invert app icon in favicon for bright backgrounds
fixes #5650 Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
1f8a3e05c1
commit
9a47b25f19
|
@ -145,6 +145,17 @@ class IconBuilder {
|
|||
$appIconFile->setResolution($resX, $resY);
|
||||
$appIconFile->setBackgroundColor(new ImagickPixel('transparent'));
|
||||
$appIconFile->readImageBlob($svg);
|
||||
|
||||
/**
|
||||
* invert app icons for bright primary colors
|
||||
* the default nextcloud logo will not be inverted to black
|
||||
*/
|
||||
if ($this->util->invertTextColor($color)
|
||||
&& !$appIcon instanceof ISimpleFile
|
||||
&& $app !== "core"
|
||||
) {
|
||||
$appIconFile->negateImage(false);
|
||||
}
|
||||
$appIconFile->scaleImage(512, 512, true);
|
||||
} else {
|
||||
$appIconFile = new Imagick();
|
||||
|
|
Loading…
Reference in New Issue