MOBILE-4456 icons: Fix branded icons not being correctly coloured

main
Pau Ferrer Ocaña 2024-04-24 14:12:24 +02:00
parent bfd37520bf
commit 78c2db0c6d
2 changed files with 5 additions and 4 deletions

View File

@ -57,7 +57,7 @@
--padding-bottom: var(--module-legacy-icon-padding, 8px);
}
&.version_current:not(.branded) {
&.colorize.version_current:not(.branded) {
::ng-deep svg,
::ng-deep svg * {
fill: var(--color) !important;

View File

@ -108,17 +108,18 @@ export class CoreModIconComponent implements OnInit, OnChanges {
/**
* Sets the isBranded property when undefined.
*
* @returns wether the icon does not need to be filtered.
*/
protected async setIsBranded(): Promise<void> {
if (!this.colorize) {
this.isBranded = false;
// It doesn't matter.
return;
}
// Earlier 4.0, icons were never colorized.
if (this.iconVersion === IconVersion.LEGACY_VERSION) {
this.isBranded = false;
this.colorize = false;
return;
@ -133,7 +134,7 @@ export class CoreModIconComponent implements OnInit, OnChanges {
return;
}
this.isBranded = false;
this.isBranded ??= false;
return;
}