@@ -9,22 +9,23 @@ import { isAncestor, trackFocus } from 'vs/base/browser/dom';
99import { WorkbenchList } from 'vs/platform/list/browser/listService' ;
1010import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
1111import { 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' ;
1515import { INotificationViewItem } from 'vs/workbench/common/notifications' ;
1616import { NotificationsListDelegate , NotificationRenderer } from 'vs/workbench/browser/parts/notifications/notificationsViewer' ;
1717import { NotificationActionRunner , CopyNotificationMessageAction } from 'vs/workbench/browser/parts/notifications/notificationsActions' ;
1818import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
1919import { assertIsDefined , assertAllDefined } from 'vs/base/common/types' ;
2020import { Codicon } from 'vs/base/common/codicons' ;
2121import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys' ;
22+ import { Disposable } from 'vs/base/common/lifecycle' ;
2223
2324export interface INotificationsListOptions extends IListOptions < INotificationViewItem > {
2425 widgetAriaLabel ?: string ;
2526}
2627
27- export class NotificationsList extends Themable {
28+ export class NotificationsList extends Disposable {
2829
2930 private listContainer : HTMLElement | undefined ;
3031 private list : WorkbenchList < INotificationViewItem > | undefined ;
@@ -36,10 +37,9 @@ export class NotificationsList extends Themable {
3637 private readonly container : HTMLElement ,
3738 private readonly options : INotificationsListOptions ,
3839 @IInstantiationService private readonly instantiationService : IInstantiationService ,
39- @IThemeService themeService : IThemeService ,
4040 @IContextMenuService private readonly contextMenuService : IContextMenuService
4141 ) {
42- super ( themeService ) ;
42+ super ( ) ;
4343 }
4444
4545 show ( focus ?: boolean ) : void {
@@ -153,8 +153,6 @@ export class NotificationsList extends Themable {
153153 } ) ) ;
154154
155155 this . container . appendChild ( this . listContainer ) ;
156-
157- this . updateStyles ( ) ;
158156 }
159157
160158 updateNotificationsList ( start : number , deleteCount : number , items : INotificationViewItem [ ] = [ ] ) {
@@ -252,19 +250,6 @@ export class NotificationsList extends Themable {
252250 return isAncestor ( document . activeElement , this . listContainer ) ;
253251 }
254252
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-
268253 layout ( width : number , maxHeight ?: number ) : void {
269254 if ( this . listContainer && this . list ) {
270255 this . listContainer . style . width = `${ width } px` ;
0 commit comments