Merge pull request #4020 from crazyserver/MOBILE-4456
MOBILE-4456 icons: Fix branded icons not being correctly colouredmain
commit
2b05e320ee
|
@ -57,7 +57,7 @@
|
||||||
--padding-bottom: var(--module-legacy-icon-padding, 8px);
|
--padding-bottom: var(--module-legacy-icon-padding, 8px);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.version_current:not(.branded) {
|
&.colorize.version_current:not(.branded) {
|
||||||
::ng-deep svg,
|
::ng-deep svg,
|
||||||
::ng-deep svg * {
|
::ng-deep svg * {
|
||||||
fill: var(--color) !important;
|
fill: var(--color) !important;
|
||||||
|
|
|
@ -108,17 +108,18 @@ export class CoreModIconComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the isBranded property when undefined.
|
* Sets the isBranded property when undefined.
|
||||||
*
|
|
||||||
* @returns wether the icon does not need to be filtered.
|
|
||||||
*/
|
*/
|
||||||
protected async setIsBranded(): Promise<void> {
|
protected async setIsBranded(): Promise<void> {
|
||||||
if (!this.colorize) {
|
if (!this.colorize) {
|
||||||
|
this.isBranded = false;
|
||||||
|
|
||||||
// It doesn't matter.
|
// It doesn't matter.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Earlier 4.0, icons were never colorized.
|
// Earlier 4.0, icons were never colorized.
|
||||||
if (this.iconVersion === IconVersion.LEGACY_VERSION) {
|
if (this.iconVersion === IconVersion.LEGACY_VERSION) {
|
||||||
|
this.isBranded = false;
|
||||||
this.colorize = false;
|
this.colorize = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -133,7 +134,7 @@ export class CoreModIconComponent implements OnInit, OnChanges {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isBranded = false;
|
this.isBranded ??= false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue