Fix transparent verification checkmark in dark mode (#30235)

* Fix transparent verification checkmark in dark mode

Fixes Issue https://github.com/element-hq/element-web/issues/28285

* Add white background to E2E Warning Icon

Also adapted the testcases to the new background.
This commit is contained in:
Banbuii
2025-07-07 13:35:03 +02:00
committed by GitHub
parent 0f7e394487
commit aa2dc8e574
4 changed files with 33 additions and 4 deletions

View File

@@ -76,7 +76,17 @@ const E2EIcon: React.FC<Props> = ({
if (onClick) {
content = <AccessibleButton onClick={onClick} className={classes} style={style} />;
} else {
content = <div className={classes} style={style} />;
// Verified and warning icon have a transparent cutout, so add a white background.
// The normal icon already has the correct shape and size, so reuse that.
if (status === E2EStatus.Verified || status === E2EStatus.Warning) {
content = (
<div className={classes} style={style}>
<div className="mx_E2EIcon_normal" />
</div>
);
} else {
content = <div className={classes} style={style} />;
}
}
if (!e2eTitle || hideTooltip) {