@@ -247,6 +247,8 @@ export class ButtonWithDropdown extends Disposable implements IButton {
247
247
private readonly button : Button ;
248
248
private readonly action : Action ;
249
249
private readonly dropdownButton : Button ;
250
+ private readonly separatorContainer : HTMLDivElement ;
251
+ private readonly separator : HTMLDivElement ;
250
252
251
253
readonly element : HTMLElement ;
252
254
private readonly _onDidClick = this . _register ( new Emitter < Event | undefined > ( ) ) ;
@@ -263,6 +265,13 @@ export class ButtonWithDropdown extends Disposable implements IButton {
263
265
this . _register ( this . button . onDidClick ( e => this . _onDidClick . fire ( e ) ) ) ;
264
266
this . action = this . _register ( new Action ( 'primaryAction' , this . button . label , undefined , true , async ( ) => this . _onDidClick . fire ( undefined ) ) ) ;
265
267
268
+ this . separatorContainer = document . createElement ( 'div' ) ;
269
+ this . separatorContainer . classList . add ( 'monaco-button-dropdown-separator' ) ;
270
+
271
+ this . separator = document . createElement ( 'div' ) ;
272
+ this . separatorContainer . appendChild ( this . separator ) ;
273
+ this . element . appendChild ( this . separatorContainer ) ;
274
+
266
275
this . dropdownButton = this . _register ( new Button ( this . element , { ...options , title : false , supportIcons : true } ) ) ;
267
276
this . dropdownButton . element . title = localize ( "button dropdown more actions" , 'More Actions...' ) ;
268
277
this . dropdownButton . element . classList . add ( 'monaco-dropdown-button' ) ;
@@ -299,6 +308,10 @@ export class ButtonWithDropdown extends Disposable implements IButton {
299
308
style ( styles : IButtonStyles ) : void {
300
309
this . button . style ( styles ) ;
301
310
this . dropdownButton . style ( styles ) ;
311
+
312
+ // Separator
313
+ this . separatorContainer . style . backgroundColor = styles . buttonBackground ?. toString ( ) ?? '' ;
314
+ this . separator . style . backgroundColor = styles . buttonForeground ?. toString ( ) ?? '' ;
302
315
}
303
316
304
317
focus ( ) : void {
0 commit comments