Archived
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IBaseActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionbar';
|
|
import { CheckboxActionViewItem } from 'vs/base/browser/ui/checkbox/checkbox';
|
|
import { IAction } from 'vs/base/common/actions';
|
|
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
|
import { attachCheckboxStyler } from 'vs/platform/theme/common/styler';
|
|
|
|
export class ThemableCheckboxActionViewItem extends CheckboxActionViewItem {
|
|
|
|
constructor(context: any, action: IAction, options: IBaseActionViewItemOptions | undefined, private readonly themeService: IThemeService) {
|
|
super(context, action, options);
|
|
}
|
|
|
|
render(container: HTMLElement): void {
|
|
super.render(container);
|
|
if (this.checkbox) {
|
|
this.disposables.add(attachCheckboxStyler(this.checkbox, this.themeService));
|
|
}
|
|
}
|
|
|
|
}
|