From dacef0561ac0e364f7add5de2177f2943dee6173 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 28 Dec 2018 12:40:51 +0100 Subject: [PATCH] define fonts per platform --- src/vs/workbench/electron-browser/media/shell.css | 10 +++++++--- src/vs/workbench/electron-browser/shell.ts | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index afdfa5d829b..1df5afc9f68 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -15,8 +15,12 @@ /* Font Families (with CJK support) */ -.monaco-shell, -.monaco-shell .monaco-menu-container .monaco-menu { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } +.monaco-shell.mac, +.monaco-shell.mac .monaco-menu-container .monaco-menu { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } +.monaco-shell.windows, +.monaco-shell.windows .monaco-menu-container .monaco-menu { font-family: "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", sans-serif; } +.monaco-shell.linux, +.monaco-shell.linux .monaco-menu-container .monaco-menu { font-family: "Ubuntu", "Droid Sans", sans-serif; } .monaco-shell:lang(zh-Hans), .monaco-shell:lang(zh-Hans) .monaco-menu-container .monaco-menu { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } .monaco-shell:lang(zh-Hant), @@ -184,4 +188,4 @@ .monaco-shell .monaco-tree.focused:focus, .monaco-shell .monaco-list:focus { outline: 0 !important; /* tree indicates focus not via outline but through the focused item */ -} \ No newline at end of file +} diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 3e48bf5772b..ab78ca93621 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -87,7 +87,7 @@ import { NotificationService } from 'vs/workbench/services/notification/common/n import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { DialogService } from 'vs/workbench/services/dialogs/electron-browser/dialogService'; import { DialogChannel } from 'vs/platform/dialogs/node/dialogIpc'; -import { EventType, addDisposableListener, addClass, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; +import { EventType, addDisposableListener, scheduleAtNextAnimationFrame, addClasses } from 'vs/base/browser/dom'; import { IRemoteAgentService } from 'vs/workbench/services/remote/node/remoteAgentService'; import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import { IOpenerService } from 'vs/platform/opener/common/opener'; @@ -538,7 +538,7 @@ export class WorkbenchShell extends Disposable { }); // Shell Class for CSS Scoping - addClass(this.container, 'monaco-shell'); + addClasses(this.container, 'monaco-shell', platform.isWindows ? 'windows' : platform.isLinux ? 'linux' : 'mac'); // Create Contents this.renderContents();