File tree Expand file tree Collapse file tree
src/components/views/rooms
test/unit-tests/components
views/dialogs/__snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,3 +59,10 @@ Please see LICENSE files in the repository root for full details.
5959 mask-image : url("$(res)/img/e2e/verified.svg" );
6060 background-color : $e2e-verified-color ;
6161}
62+
63+ // When using the "normal" icon as a background for verified or warning icon,
64+ // it should be slightly smaller than the foreground icon
65+ .mx_E2EIcon_verified , .mx_E2EIcon_warning .mx_E2EIcon_normal::after {
66+ mask-size : 90 % ;
67+ background-color : white;
68+ }
Original file line number Diff line number Diff line change @@ -76,7 +76,17 @@ const E2EIcon: React.FC<Props> = ({
7676 if ( onClick ) {
7777 content = < AccessibleButton onClick = { onClick } className = { classes } style = { style } /> ;
7878 } else {
79- content = < div className = { classes } style = { style } /> ;
79+ // Verified and warning icon have a transparent cutout, so add a white background.
80+ // The normal icon already has the correct shape and size, so reuse that.
81+ if ( status === E2EStatus . Verified || status === E2EStatus . Warning ) {
82+ content = (
83+ < div className = { classes } style = { style } >
84+ < div className = "mx_E2EIcon_normal" />
85+ </ div >
86+ ) ;
87+ } else {
88+ content = < div className = { classes } style = { style } /> ;
89+ }
8090 }
8191
8292 if ( ! e2eTitle || hideTooltip ) {
Original file line number Diff line number Diff line change @@ -1809,7 +1809,11 @@ exports[`RoomView should not display the timeline when the room encryption is lo
18091809 <div
18101810 aria-labelledby = " «r3e»"
18111811 class = " mx_E2EIcon mx_E2EIcon_verified mx_MessageComposer_e2eIcon"
1812- />
1812+ >
1813+ <div
1814+ class = " mx_E2EIcon_normal"
1815+ />
1816+ </div >
18131817 </span >
18141818 </div >
18151819 <div
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ exports[`<UntrustedDeviceDialog /> should display the dialog for the device of a
2323 <div
2424 class = " mx_E2EIcon mx_E2EIcon_warning"
2525 style = " width: 24px; height: 24px;"
26- />
26+ >
27+ <div
28+ class = " mx_E2EIcon_normal"
29+ />
30+ </div >
2731 Not Trusted
2832 </h1 >
2933 </div >
@@ -97,7 +101,11 @@ exports[`<UntrustedDeviceDialog /> should display the dialog for the device of t
97101 <div
98102 class = " mx_E2EIcon mx_E2EIcon_warning"
99103 style = " width: 24px; height: 24px;"
100- />
104+ >
105+ <div
106+ class = " mx_E2EIcon_normal"
107+ />
108+ </div >
101109 Not Trusted
102110 </h1 >
103111 </div >
You can’t perform that action at this time.
0 commit comments