Skip to content

Commit

Permalink
empty view: fix hover feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Jun 13, 2018
1 parent 8810c8e commit 12297b2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/vs/workbench/parts/files/electron-browser/views/emptyView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class EmptyView extends ViewletPanel {

this.messageDiv = $('p').appendTo($('div.section').appendTo(container));

let section = $('div.section').appendTo(container);
const section = $('div.section').appendTo(container);

this.button = new Button(section.getHTMLElement());
attachButtonStyler(this.button, this.themeService);
Expand All @@ -75,20 +75,16 @@ export class EmptyView extends ViewletPanel {
}));

this.disposables.push(DOM.addDisposableListener(container, DOM.EventType.DROP, (e: DragEvent) => {
container.style.backgroundColor = this.themeService.getTheme().getColor(SIDE_BAR_BACKGROUND).toString();
const dropHandler = this.instantiationService.createInstance(ResourcesDropHandler, { allowWorkspaceOpen: true });
dropHandler.handleDrop(e, () => undefined, targetGroup => undefined);
}));
this.disposables.push(DOM.addDisposableListener(container, DOM.EventType.DRAG_ENTER, () => {
container.style.backgroundColor = this.themeService.getTheme().getColor(listDropBackground).toString();
}));
this.disposables.push(DOM.addDisposableListener(container, DOM.EventType.DRAG_LEAVE, () => {
container.style.backgroundColor = this.themeService.getTheme().getColor(SIDE_BAR_BACKGROUND).toString();
}));
this.disposables.push(DOM.addDisposableListener(container, DOM.EventType.DROP, () => {
container.style.backgroundColor = this.themeService.getTheme().getColor(SIDE_BAR_BACKGROUND).toString();
}));
this.disposables.push(DOM.addDisposableListener(container, DOM.EventType.DRAG_OVER, (e: DragEvent) => {
e.dataTransfer.dropEffect = 'copy';
container.style.backgroundColor = this.themeService.getTheme().getColor(listDropBackground).toString();
}));

this.setLabels();
Expand Down

0 comments on commit 12297b2

Please sign in to comment.