5
5
6
6
import { Color , RGBA } from 'vs/base/common/color' ;
7
7
import { localize } from 'vs/nls' ;
8
- import { contrastBorder , diffInserted , diffRemoved , editorBackground , editorErrorForeground , editorForeground , editorInfoForeground , opaque , registerColor , transparent } from 'vs/platform/theme/common/colorRegistry' ;
8
+ import { chartsGreen , chartsRed , contrastBorder , diffInserted , diffRemoved , editorBackground , editorErrorForeground , editorForeground , editorInfoForeground , opaque , registerColor , transparent } from 'vs/platform/theme/common/colorRegistry' ;
9
9
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
10
10
import { TestMessageType , TestResultState } from 'vs/workbench/contrib/testing/common/testTypes' ;
11
11
@@ -93,11 +93,18 @@ export const testingCoveredBackground = registerColor('testing.coveredBackground
93
93
hcLight : null
94
94
} , localize ( 'testing.coveredBackground' , 'Background color of text that was covered.' ) ) ;
95
95
96
+ export const testingCoveredBorder = registerColor ( 'testing.coveredBorder' , {
97
+ dark : transparent ( testingCoveredBackground , 0.75 ) ,
98
+ light : transparent ( testingCoveredBackground , 0.75 ) ,
99
+ hcDark : contrastBorder ,
100
+ hcLight : contrastBorder
101
+ } , localize ( 'testing.coveredBorder' , 'Border color of text that was covered.' ) ) ;
102
+
96
103
export const testingCoveredGutterBackground = registerColor ( 'testing.coveredGutterBackground' , {
97
104
dark : transparent ( diffInserted , 0.6 ) ,
98
105
light : transparent ( diffInserted , 0.6 ) ,
99
- hcDark : null ,
100
- hcLight : null
106
+ hcDark : chartsGreen ,
107
+ hcLight : chartsGreen
101
108
} , localize ( 'testing.coveredGutterBackground' , 'Gutter color of regions where code was covered.' ) ) ;
102
109
103
110
export const testingUncoveredBranchBackground = registerColor ( 'testing.uncoveredBranchBackground' , {
@@ -114,11 +121,18 @@ export const testingUncoveredBackground = registerColor('testing.uncoveredBackgr
114
121
hcLight : null
115
122
} , localize ( 'testing.uncoveredBackground' , 'Background color of text that was not covered.' ) ) ;
116
123
124
+ export const testingUncoveredBorder = registerColor ( 'testing.uncoveredBorder' , {
125
+ dark : transparent ( testingUncoveredBackground , 0.75 ) ,
126
+ light : transparent ( testingUncoveredBackground , 0.75 ) ,
127
+ hcDark : contrastBorder ,
128
+ hcLight : contrastBorder
129
+ } , localize ( 'testing.uncoveredBorder' , 'Border color of text that was not covered.' ) ) ;
130
+
117
131
export const testingUncoveredGutterBackground = registerColor ( 'testing.uncoveredGutterBackground' , {
118
132
dark : transparent ( diffRemoved , 1.5 ) ,
119
133
light : transparent ( diffRemoved , 1.5 ) ,
120
- hcDark : null ,
121
- hcLight : null
134
+ hcDark : chartsRed ,
135
+ hcLight : chartsRed
122
136
} , localize ( 'testing.uncoveredGutterBackground' , 'Gutter color of regions where code not covered.' ) ) ;
123
137
124
138
export const testMessageSeverityColors : {
@@ -168,19 +182,13 @@ registerThemingParticipant((theme, collector) => {
168
182
const missBadgeBackground = editorBg && theme . getColor ( testingUncoveredBackground ) ?. transparent ( 2 ) . makeOpaque ( editorBg ) ;
169
183
170
184
collector . addRule ( `
171
- .coverage-deco-inline.coverage-deco-hit {
172
- outline: 1px solid ${ theme . getColor ( testingCoveredBackground ) ?. transparent ( 0.75 ) } ;
173
- }
174
185
.coverage-deco-inline.coverage-deco-hit.coverage-deco-hovered {
175
186
background: ${ theme . getColor ( testingCoveredBackground ) ?. transparent ( 1.3 ) } ;
176
- outline: 1px solid ${ theme . getColor ( testingCoveredBackground ) ?. transparent ( 2 ) } ;
177
- }
178
- .coverage-deco-inline.coverage-deco-miss {
179
- outline: 1px solid ${ theme . getColor ( testingUncoveredBackground ) ?. transparent ( 0.75 ) } ;
187
+ outline-color: ${ theme . getColor ( testingCoveredBorder ) ?. transparent ( 2 ) } ;
180
188
}
181
189
.coverage-deco-inline.coverage-deco-miss.coverage-deco-hovered {
182
190
background: ${ theme . getColor ( testingUncoveredBackground ) ?. transparent ( 1.3 ) } ;
183
- outline: 1px solid ${ theme . getColor ( testingUncoveredBackground ) ?. transparent ( 2 ) } ;
191
+ outline-color: ${ theme . getColor ( testingUncoveredBorder ) ?. transparent ( 2 ) } ;
184
192
}
185
193
.coverage-deco-branch-miss-indicator::before {
186
194
border-color: ${ missBadgeBackground ?. transparent ( 1.3 ) } ;
0 commit comments