diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index fbfbe7c5adea8d5fb51b945fa9194a4a31fc8c91..57c500bc7a0e418c1ed84f7d09027bd7976ab95d 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -92,6 +92,7 @@ export class VSCodeMenu { }); // Listen to some events from window service + this.windowsService.onPathOpen(path => this.updateMenu()); this.windowsService.onRecentPathsChange(paths => this.updateMenu()); this.windowsService.onWindowClose(_ => this.onClose(this.windowsService.getWindowCount())); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 72f4add06cf6b3359c03d99b12c7f9e4b6ee10cf..cc89f92d57d921a833039fd59c0a4accc4e8077e 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -90,6 +90,7 @@ export interface IWindowsMainService { // events onWindowReady: CommonEvent; onWindowClose: CommonEvent; + onPathOpen: CommonEvent; onRecentPathsChange: CommonEvent; // methods @@ -143,6 +144,9 @@ export class WindowsManager implements IWindowsMainService { private _onWindowClose = new Emitter(); onWindowClose: CommonEvent = this._onWindowClose.event; + private _onPathOpen = new Emitter(); + onPathOpen: CommonEvent = this._onPathOpen.event; + constructor( @IInstantiationService private instantiationService: IInstantiationService, @ILogService private logService: ILogService, @@ -509,6 +513,9 @@ export class WindowsManager implements IWindowsMainService { // Register new paths for backup this.backupService.pushWorkspaceBackupPathsSync(iPathsToOpen.filter(p => p.workspacePath).map(p => Uri.file(p.workspacePath))); + // Emit events + iPathsToOpen.forEach(iPath => this._onPathOpen.fire(iPath)); + return arrays.distinct(usedWindows); } diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 08af40e81c4d3ec184f24b0b818dee392bc354c0..b891f27caed413396c047f395d1bd67272ee4f08 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -91,7 +91,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal @IEditorGroupService private editorGroupService: IEditorGroupService, @IPartService private partService: IPartService, @IViewletService private viewletService: IViewletService, - @IThemeService themeService: IThemeService, + @IThemeService themeService: IThemeService ) { this.parent = parent; this.workbenchContainer = workbenchContainer; @@ -358,7 +358,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal let sidebarSize = new Dimension(sidebarWidth, this.sidebarHeight); // Activity Bar - this.activitybarWidth = isActivityBarHidden ? 0 : this.initialComputedStyles.activitybar.width / getZoomFactor(); // adjust for zoom prevention + this.activitybarWidth = isActivityBarHidden ? 0 : this.computedStyles.activitybar.width; let activityBarSize = new Dimension(this.activitybarWidth, sidebarSize.height); // Panel part @@ -478,8 +478,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal } // Activity Bar Part - this.activitybar.getContainer().size(activityBarSize.width, activityBarSize.height); - + this.activitybar.getContainer().size(null, activityBarSize.height); if (sidebarPosition === Position.LEFT) { this.activitybar.getContainer().getHTMLElement().style.right = ''; this.activitybar.getContainer().position(this.titlebarHeight, null, 0, 0); diff --git a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css index 04b17aca01b6f70f891225af6eb7fb11967b850b..7fd426208ac7441f58c75c28857fffed63807731 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css +++ b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css @@ -17,13 +17,12 @@ margin-right: 0; padding: 0 0 0 50px; box-sizing: border-box; - background-position: center center; + background-position: 9px center; background-repeat: no-repeat; opacity: 0.6; font-size: 15px; color: white; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8); - zoom: reset; /* prevent zooming */ } .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label:focus:before { diff --git a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css b/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css index 77da8ec72f8713147248313bdc2f938dc4666b23..58f68c70d58072c8329b18e0d19c5fbe7bef7fe0 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css +++ b/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css @@ -14,7 +14,6 @@ .monaco-workbench > .activitybar > .content .monaco-action-bar { text-align: left; background-color: inherit; - zoom: reset; /* prevent zooming */ } .vs .monaco-workbench > .activitybar > .content {