mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
parent
8aca9a5331
commit
936a283cf9
|
@ -42,7 +42,7 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
|||
import { SeverityIcon } from 'vs/platform/severityIcon/browser/severityIcon';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IViewDescriptorService, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
|
@ -183,7 +183,20 @@ export class ExtensionsListView extends ViewPane {
|
|||
const messageBox = append(messageContainer, $('.message'));
|
||||
const delegate = new Delegate();
|
||||
const extensionsViewState = new ExtensionsViewState();
|
||||
const renderer = this.instantiationService.createInstance(Renderer, extensionsViewState, { hoverOptions: { position: () => { return this.layoutService.getSideBarPosition() === Position.LEFT ? HoverPosition.RIGHT : HoverPosition.LEFT; } } });
|
||||
const renderer = this.instantiationService.createInstance(Renderer, extensionsViewState, {
|
||||
hoverOptions: {
|
||||
position: () => {
|
||||
const viewLocation = this.viewDescriptorService.getViewLocationById(this.id);
|
||||
if (viewLocation === ViewContainerLocation.Sidebar) {
|
||||
return this.layoutService.getSideBarPosition() === Position.LEFT ? HoverPosition.RIGHT : HoverPosition.LEFT;
|
||||
}
|
||||
if (viewLocation === ViewContainerLocation.AuxiliaryBar) {
|
||||
return this.layoutService.getSideBarPosition() === Position.LEFT ? HoverPosition.LEFT : HoverPosition.RIGHT;
|
||||
}
|
||||
return HoverPosition.RIGHT;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.list = this.instantiationService.createInstance(WorkbenchPagedList, 'Extensions', extensionsList, delegate, [renderer], {
|
||||
multipleSelectionSupport: false,
|
||||
setRowLineHeight: false,
|
||||
|
|
Loading…
Reference in a new issue