提交 2afb3360 编写于 作者: R Ryan Adolf

Make Linux compatible

上级 8667ae7e
......@@ -174,7 +174,7 @@ export class CodeWindow implements ICodeWindow {
}
let useCustomTitleStyle = false;
if ((isWindows && windowConfig && windowConfig.titleBarStyle === 'custom') ||
if ((!isMacintosh && windowConfig && windowConfig.titleBarStyle === 'custom') ||
(isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom'))) {
const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath;
if (!isMacintosh || !isDev) {
......@@ -189,7 +189,7 @@ export class CodeWindow implements ICodeWindow {
if (useCustomTitleStyle) {
options.titleBarStyle = 'hidden';
this.hiddenTitleBarStyle = true;
if (isWindows) {
if (!isMacintosh) {
options.frame = false;
}
}
......
......@@ -783,7 +783,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
}
public onMaximizeChange(maximized: boolean): void {
if (isWindows) {
if (!isMacintosh) {
this.titlebarBaseHeight = maximized ? 23 : this.partLayoutInfo.titlebar.height;
} else {
this.titlebarBaseHeight = this.partLayoutInfo.titlebar.height;
......
......@@ -231,7 +231,7 @@ export class TitlebarPart extends Part implements ITitleService {
const SVGNS = 'http://www.w3.org/2000/svg';
this.titleContainer = $(parent);
if (isWindows) {
if (!isMacintosh) {
$(this.titleContainer).img({ class: 'window-appicon', src: path.join(this.environmentService.appRoot, 'resources/linux/code.png') });
}
......@@ -265,7 +265,7 @@ export class TitlebarPart extends Part implements ITitleService {
return el;
};
if (isWindows) {
if (!isMacintosh) {
// The svgs and styles for the titlebar come from the electron-titlebar-windows package
$(this.titleContainer).div({ class: 'window-icon' }, (builder) => {
const svg = $svg('svg', { x: 0, y: 0, viewBox: '0 0 10 1' });
......
......@@ -378,8 +378,7 @@ configurationRegistry.registerConfiguration({
'type': 'string',
'enum': ['native', 'custom'],
'default': isMacintosh ? 'custom' : 'native',
'description': nls.localize('titleBarStyle', "Adjust the appearance of the window title bar. Changes require a full restart to apply."),
'included': isMacintosh || isWindows
'description': nls.localize('titleBarStyle', "Adjust the appearance of the window title bar. Changes require a full restart to apply.")
},
'window.nativeTabs': {
'type': 'boolean',
......
......@@ -734,9 +734,6 @@ export class Workbench implements IPartService {
}
private getCustomTitleBarStyle(): 'custom' {
if (!isMacintosh && !isWindows) {
return null; // custom title bar is only supported on Mac and Windows currently
}
const isDev = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment;
if (isMacintosh && isDev) {
......
......@@ -1130,10 +1130,6 @@ export class TestWindowsService implements IWindowsService {
return TPromise.as(void 0);
}
addMaximizeListener(windowId: number, listener: (maximized: boolean) => void): TPromise<void> {
return TPromise.as(void 0);
}
onWindowTitleDoubleClick(windowId: number): TPromise<void> {
return TPromise.as(void 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册