@@ -15,6 +15,10 @@ import { DecorationSelector, updateLayout } from 'vs/workbench/contrib/terminal/
15
15
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
16
16
import { Terminal , IDecoration } from 'xterm' ;
17
17
import { IAction } from 'vs/base/common/actions' ;
18
+ import { IColorTheme , ICssStyleCollector , registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
19
+ import { PANEL_BACKGROUND } from 'vs/workbench/common/theme' ;
20
+ import { TERMINAL_BACKGROUND_COLOR } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry' ;
21
+ import { Color } from 'vs/base/common/color' ;
18
22
19
23
export interface ITerminalQuickFix {
20
24
showMenu ( ) : void ;
@@ -115,8 +119,7 @@ export class TerminalQuickFixAddon extends Disposable implements ITerminalAddon,
115
119
decoration ?. onRender ( ( e : HTMLElement ) => {
116
120
if ( ! this . _decorationMarkerIds . has ( decoration . marker . id ) ) {
117
121
this . _currentQuickFixElement = e ;
118
- e . classList . add ( DecorationSelector . QuickFix , DecorationSelector . Codicon , DecorationSelector . CommandDecoration , DecorationSelector . XtermDecoration ) ;
119
- e . style . color = '#ffcc00' ;
122
+ e . classList . add ( DecorationSelector . QuickFix , DecorationSelector . LightBulb , DecorationSelector . Codicon , DecorationSelector . CommandDecoration , DecorationSelector . XtermDecoration ) ;
120
123
updateLayout ( this . _configurationService , e ) ;
121
124
if ( actions ) {
122
125
this . _decorationMarkerIds . add ( decoration . marker . id ) ;
@@ -168,3 +171,16 @@ export function getQuickFixes(command: ITerminalCommand, actionOptions: Map<stri
168
171
}
169
172
return actions . length === 0 ? undefined : actions ;
170
173
}
174
+
175
+ let foregroundColor : string | Color | undefined ;
176
+ let backgroundColor : string | Color | undefined ;
177
+ registerThemingParticipant ( ( theme : IColorTheme , collector : ICssStyleCollector ) => {
178
+ foregroundColor = theme . getColor ( 'editorLightBulb.foreground' ) ;
179
+ backgroundColor = theme . getColor ( TERMINAL_BACKGROUND_COLOR ) || theme . getColor ( PANEL_BACKGROUND ) ;
180
+ if ( foregroundColor ) {
181
+ collector . addRule ( `.${ DecorationSelector . CommandDecoration } .${ DecorationSelector . QuickFix } { color: ${ foregroundColor . toString ( ) } !important; } ` ) ;
182
+ }
183
+ if ( backgroundColor ) {
184
+ collector . addRule ( `.${ DecorationSelector . CommandDecoration } .${ DecorationSelector . QuickFix } { background-color: ${ backgroundColor . toString ( ) } ; } ` ) ;
185
+ }
186
+ } ) ;
0 commit comments