File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed
src/components/views/rooms
test/unit-tests/components/views/dialogs/__snapshots__ Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ Please see LICENSE files in the repository root for full details.
60
60
background-color : $e2e-verified-color ;
61
61
}
62
62
63
- .mx_E2EIcon_verified .mx_E2EIcon_normal::after {
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 {
64
66
mask-size : 90 % ;
65
67
background-color : white;
66
68
}
Original file line number Diff line number Diff line change @@ -76,8 +76,14 @@ const E2EIcon: React.FC<Props> = ({
76
76
if ( onClick ) {
77
77
content = < AccessibleButton onClick = { onClick } className = { classes } style = { style } /> ;
78
78
} else {
79
- if ( status === E2EStatus . Verified ) {
80
- content = < div className = { classes } style = { style } > < div className = "mx_E2EIcon_normal" /> </ div > ;
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
+ ) ;
81
87
} else {
82
88
content = < div className = { classes } style = { style } /> ;
83
89
}
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
23
23
<div
24
24
class = " mx_E2EIcon mx_E2EIcon_warning"
25
25
style = " width: 24px; height: 24px;"
26
- />
26
+ >
27
+ <div
28
+ class = " mx_E2EIcon_normal"
29
+ />
30
+ </div >
27
31
Not Trusted
28
32
</h1 >
29
33
</div >
@@ -97,7 +101,11 @@ exports[`<UntrustedDeviceDialog /> should display the dialog for the device of t
97
101
<div
98
102
class = " mx_E2EIcon mx_E2EIcon_warning"
99
103
style = " width: 24px; height: 24px;"
100
- />
104
+ >
105
+ <div
106
+ class = " mx_E2EIcon_normal"
107
+ />
108
+ </div >
101
109
Not Trusted
102
110
</h1 >
103
111
</div >
You can’t perform that action at this time.
0 commit comments