mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!./selectBox';
|
||||
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { deepClone, mixin } from 'vs/base/common/objects';
|
||||
@@ -34,6 +34,10 @@ export interface ISelectBoxDelegate {
|
||||
applyStyles(): void;
|
||||
}
|
||||
|
||||
export interface ISelectBoxOptions {
|
||||
minBottomMargin?: number;
|
||||
}
|
||||
|
||||
export interface ISelectBoxStyles extends IListStyles {
|
||||
selectBackground?: Color;
|
||||
selectListBackground?: Color;
|
||||
@@ -54,21 +58,16 @@ export interface ISelectData {
|
||||
}
|
||||
|
||||
export class SelectBox extends Widget implements ISelectBoxDelegate {
|
||||
protected options: string[];
|
||||
private selected: number;
|
||||
private _onDidSelect: Emitter<ISelectData>;
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
protected selectElement: HTMLSelectElement;
|
||||
protected selectBackground: Color;
|
||||
protected selectForeground: Color;
|
||||
protected selectBorder: Color;
|
||||
private toDispose: IDisposable[];
|
||||
|
||||
private styles: ISelectBoxStyles;
|
||||
private selectBoxDelegate: ISelectBoxDelegate;
|
||||
|
||||
constructor(options: string[], selected: number, contextViewProvider: IContextViewProvider, styles: ISelectBoxStyles = deepClone(defaultStyles)) {
|
||||
constructor(options: string[], selected: number, contextViewProvider: IContextViewProvider, styles: ISelectBoxStyles = deepClone(defaultStyles), selectBoxOptions?: ISelectBoxOptions) {
|
||||
super();
|
||||
|
||||
this.toDispose = [];
|
||||
@@ -79,7 +78,7 @@ export class SelectBox extends Widget implements ISelectBoxDelegate {
|
||||
if (isMacintosh) {
|
||||
this.selectBoxDelegate = new SelectBoxNative(options, selected, styles);
|
||||
} else {
|
||||
this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles);
|
||||
this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles, selectBoxOptions);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
|
||||
Reference in New Issue
Block a user