提交 a9dc3120 编写于 作者: B Benjamin Pasero

notifications - disable scrollbar in toasts

上级 eb5e41cf
......@@ -75,7 +75,10 @@ export class NotificationsCenter extends Themable {
this.notificationsCenterContainer = document.createElement('div');
addClass(this.notificationsCenterContainer, 'notifications-center');
this.notificationsList = this.instantiationService.createInstance(NotificationsList, this.notificationsCenterContainer, { ariaLabel: localize('notificationsList', "Notifications List") });
this.notificationsList = this.instantiationService.createInstance(NotificationsList, this.notificationsCenterContainer, {
ariaLabel: localize('notificationsList', "Notifications List"),
useShadows: false
});
this.container.appendChild(this.notificationsCenterContainer);
}
......
......@@ -18,10 +18,6 @@ import { NotificationsListDelegate, NotificationRenderer } from 'vs/workbench/br
import { NotificationActionRunner } from 'vs/workbench/browser/parts/notifications/notificationsActions';
import { NotificationFocusedContext } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
export interface INotificationsListOptions {
ariaLabel: string;
}
export class NotificationsList extends Themable {
private listContainer: HTMLElement;
private list: WorkbenchList<INotificationViewItem>;
......@@ -30,7 +26,7 @@ export class NotificationsList extends Themable {
constructor(
private container: HTMLElement,
private options: INotificationsListOptions,
private options: IListOptions<INotificationViewItem>,
@IInstantiationService private instantiationService: IInstantiationService,
@IThemeService themeService: IThemeService
) {
......@@ -77,9 +73,7 @@ export class NotificationsList extends Themable {
this.listContainer,
new NotificationsListDelegate(this.listContainer),
[renderer],
{
ariaLabel: this.options.ariaLabel
} as IListOptions<INotificationViewItem>
this.options
);
this.toUnbind.push(this.list);
......
......@@ -22,6 +22,7 @@ import { NotificationsToastsVisibleContext } from 'vs/workbench/browser/parts/no
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { localize } from 'vs/nls';
import { Severity } from 'vs/platform/notification/common/notification';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
interface INotificationToast {
list: NotificationsList;
......@@ -106,7 +107,10 @@ export class NotificationsToasts extends Themable {
itemDisposeables.push(toDisposable(() => this.notificationsToastsContainer.removeChild(notificationToastContainer)));
// Create toast with item and show
const notificationList = this.instantiationService.createInstance(NotificationsList, notificationToastContainer, { ariaLabel: localize('notificationsToast', "Notification Toast") });
const notificationList = this.instantiationService.createInstance(NotificationsList, notificationToastContainer, {
ariaLabel: localize('notificationsToast', "Notification Toast"),
verticalScrollMode: ScrollbarVisibility.Hidden
});
itemDisposeables.push(notificationList);
this.mapNotificationToToast.set(item, { list: notificationList, container: notificationToastContainer, disposeables: itemDisposeables });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册