mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Query Editor Refactor (#5528)
* query editor changes * query editor changes * finish converting query editor * fix merge issue * remove unused code * fix tests * fix tests * remove editor context key class * edit tests to test input state
This commit is contained in:
@@ -160,10 +160,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
options.tabbingIdentifier = product.nameShort; // this opts in to sierra tabs
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// turn-off custom menus to avoid bug calculating size of SQL editor
|
||||
// const useCustomTitleStyle = getTitleBarStyle(this.configurationService, this.environmentService, !!config.extensionDevelopmentPath) === 'custom';
|
||||
const useCustomTitleStyle = false;
|
||||
const useCustomTitleStyle = getTitleBarStyle(this.configurationService, this.environmentService, !!config.extensionDevelopmentPath) === 'custom';
|
||||
if (useCustomTitleStyle) {
|
||||
options.titleBarStyle = 'hidden';
|
||||
this.hiddenTitleBarStyle = true;
|
||||
|
||||
@@ -300,16 +300,13 @@ export function getTitleBarStyle(configurationService: IConfigurationService, en
|
||||
return 'native'; // simple fullscreen does not work well with custom title style (https://github.com/Microsoft/vscode/issues/63291)
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - Always use native toolbar
|
||||
// const style = configuration.titleBarStyle;
|
||||
// if (style === 'native' || style === 'custom') {
|
||||
// return style;
|
||||
// }
|
||||
const style = configuration.titleBarStyle;
|
||||
if (style === 'native' || style === 'custom') {
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - Always use native toolbar
|
||||
return 'native';
|
||||
// return isLinux ? 'native' : 'custom'; // default to custom on all macOS and Windows
|
||||
return isLinux ? 'native' : 'custom'; // default to custom on all macOS and Windows
|
||||
}
|
||||
|
||||
export const enum OpenContext {
|
||||
|
||||
@@ -219,7 +219,6 @@ export class MenubarControl extends Disposable {
|
||||
|
||||
// TODO@sbatten remove after feb19
|
||||
private notifyExistingLinuxUser(): void {
|
||||
/*// {{SQL CARBON EDIT}} - Disable the custom titlebar recommendation
|
||||
if (!isLinux) {
|
||||
return;
|
||||
}
|
||||
@@ -246,7 +245,6 @@ export class MenubarControl extends Disposable {
|
||||
}
|
||||
}
|
||||
]);
|
||||
*/
|
||||
}
|
||||
|
||||
private notifyUserOfCustomMenubarAccessibility(): void {
|
||||
|
||||
@@ -55,12 +55,11 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
|
||||
private onConfigurationChange(config: IConfiguration, notify: boolean): void {
|
||||
let changed = false;
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Titlebar style
|
||||
// if (config.window && config.window.titleBarStyle !== this.titleBarStyle && (config.window.titleBarStyle === 'native' || config.window.titleBarStyle === 'custom')) {
|
||||
// this.titleBarStyle = 'native'; //config.window.titleBarStyle;
|
||||
// changed = true;
|
||||
// }
|
||||
if (config.window && config.window.titleBarStyle !== this.titleBarStyle && (config.window.titleBarStyle === 'native' || config.window.titleBarStyle === 'custom')) {
|
||||
this.titleBarStyle = config.window.titleBarStyle;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// macOS: Native tabs
|
||||
if (isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
|
||||
|
||||
Reference in New Issue
Block a user