Skip to content

Task/Traffic-light-buttons-are-out-of-place-on-macOs-big-sur #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/menuitem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ import {
EventHelper,
EventLike
} from "vs/base/browser/dom";
import {BrowserWindow, remote, Accelerator, NativeImage, MenuItem} from "electron";
import {BrowserWindow, Accelerator, NativeImage, MenuItem} from "electron";
import {MENU_MNEMONIC_REGEX, cleanMnemonic, MENU_ESCAPED_MNEMONIC_REGEX} from "./mnemonic";
import {KeyCode, KeyCodeUtils} from "vs/base/common/keyCodes";
import {Disposable} from "vs/base/common/lifecycle";
import {isMacintosh} from "vs/base/common/platform";
import {IMenuItem, IMenuStyle, IMenuOptions} from './api'
import * as strings from 'vs/base/common/strings';
import {EventType as TouchEventType} from 'vs/base/browser/touch';
const remote = require("@electron/remote");

let menuItemId = 0;

Expand Down
8 changes: 7 additions & 1 deletion src/titlebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ const ACTIVE_FOREGROUND_DARK = Color.fromHex('#333333');
const INACTIVE_FOREGROUND = Color.fromHex('#EEEEEE');
const ACTIVE_FOREGROUND = Color.fromHex('#FFFFFF');

const IS_MAC_BIGSUR_OR_LATER = isMacintosh && parseInt(process.getSystemVersion().split(".")[0]) >= 11;
const BOTTOM_TITLEBAR_HEIGHT = '60px';
const TOP_TITLEBAR_HEIGHT_MAC = '22px';
const TOP_TITLEBAR_HEIGHT_MAC = IS_MAC_BIGSUR_OR_LATER ? '28px': '22px';
const TOP_TITLEBAR_HEIGHT_WIN = '30px';

const TitlebarEventType = {
Expand Down Expand Up @@ -200,6 +201,11 @@ export class Titlebar extends Themebar {
this.title.style.cursor = 'default';
}

if (IS_MAC_BIGSUR_OR_LATER) {
this.title.style.fontWeight = "600";
this.title.style.fontSize = "13px";
}

this.updateTitle();
this.setHorizontalAlignment(this._options.titleHorizontalAlignment);

Expand Down