@@ -9,22 +9,23 @@ import { isAncestor, trackFocus } from 'vs/base/browser/dom';
9
9
import { WorkbenchList } from 'vs/platform/list/browser/listService' ;
10
10
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
11
11
import { IListOptions } from 'vs/base/browser/ui/list/listWidget' ;
12
- import { NOTIFICATIONS_LINKS , NOTIFICATIONS_BACKGROUND , NOTIFICATIONS_FOREGROUND , NOTIFICATIONS_ERROR_ICON_FOREGROUND , NOTIFICATIONS_WARNING_ICON_FOREGROUND , NOTIFICATIONS_INFO_ICON_FOREGROUND } from 'vs/workbench/common/theme' ;
13
- import { IThemeService , registerThemingParticipant , Themable } from 'vs/platform/theme/common/themeService' ;
14
- import { contrastBorder , focusBorder } from 'vs/platform/theme/common/colorRegistry' ;
12
+ import { NOTIFICATIONS_LINKS , NOTIFICATIONS_BACKGROUND , NOTIFICATIONS_ERROR_ICON_FOREGROUND , NOTIFICATIONS_WARNING_ICON_FOREGROUND , NOTIFICATIONS_INFO_ICON_FOREGROUND } from 'vs/workbench/common/theme' ;
13
+ import { registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
14
+ import { focusBorder } from 'vs/platform/theme/common/colorRegistry' ;
15
15
import { INotificationViewItem } from 'vs/workbench/common/notifications' ;
16
16
import { NotificationsListDelegate , NotificationRenderer } from 'vs/workbench/browser/parts/notifications/notificationsViewer' ;
17
17
import { NotificationActionRunner , CopyNotificationMessageAction } from 'vs/workbench/browser/parts/notifications/notificationsActions' ;
18
18
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
19
19
import { assertIsDefined , assertAllDefined } from 'vs/base/common/types' ;
20
20
import { Codicon } from 'vs/base/common/codicons' ;
21
21
import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys' ;
22
+ import { Disposable } from 'vs/base/common/lifecycle' ;
22
23
23
24
export interface INotificationsListOptions extends IListOptions < INotificationViewItem > {
24
25
widgetAriaLabel ?: string ;
25
26
}
26
27
27
- export class NotificationsList extends Themable {
28
+ export class NotificationsList extends Disposable {
28
29
29
30
private listContainer : HTMLElement | undefined ;
30
31
private list : WorkbenchList < INotificationViewItem > | undefined ;
@@ -36,10 +37,9 @@ export class NotificationsList extends Themable {
36
37
private readonly container : HTMLElement ,
37
38
private readonly options : INotificationsListOptions ,
38
39
@IInstantiationService private readonly instantiationService : IInstantiationService ,
39
- @IThemeService themeService : IThemeService ,
40
40
@IContextMenuService private readonly contextMenuService : IContextMenuService
41
41
) {
42
- super ( themeService ) ;
42
+ super ( ) ;
43
43
}
44
44
45
45
show ( focus ?: boolean ) : void {
@@ -153,8 +153,6 @@ export class NotificationsList extends Themable {
153
153
} ) ) ;
154
154
155
155
this . container . appendChild ( this . listContainer ) ;
156
-
157
- this . updateStyles ( ) ;
158
156
}
159
157
160
158
updateNotificationsList ( start : number , deleteCount : number , items : INotificationViewItem [ ] = [ ] ) {
@@ -252,19 +250,6 @@ export class NotificationsList extends Themable {
252
250
return isAncestor ( document . activeElement , this . listContainer ) ;
253
251
}
254
252
255
- protected override updateStyles ( ) : void {
256
- if ( this . listContainer ) {
257
- const foreground = this . getColor ( NOTIFICATIONS_FOREGROUND ) ;
258
- this . listContainer . style . color = foreground ? foreground : '' ;
259
-
260
- const background = this . getColor ( NOTIFICATIONS_BACKGROUND ) ;
261
- this . listContainer . style . background = background ? background : '' ;
262
-
263
- const outlineColor = this . getColor ( contrastBorder ) ;
264
- this . listContainer . style . outlineColor = outlineColor ? outlineColor : '' ;
265
- }
266
- }
267
-
268
253
layout ( width : number , maxHeight ?: number ) : void {
269
254
if ( this . listContainer && this . list ) {
270
255
this . listContainer . style . width = `${ width } px` ;
0 commit comments