mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a (#7436)
* Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a * fix strict null checks
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.settings-editor:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
/* header styling */
|
||||
.settings-editor > .settings-header {
|
||||
box-sizing: border-box;
|
||||
@@ -158,7 +162,7 @@
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body .settings-tree-container .monaco-list-row .mouseover .setting-toolbar-container > .monaco-toolbar .codicon-more,
|
||||
.settings-editor > .settings-body .settings-tree-container .monaco-list-row .setting-item.focused .setting-toolbar-container > .monaco-toolbar .codicon-more,
|
||||
.settings-editor > .settings-body .settings-tree-container .monaco-list-row .setting-item-contents.focused .setting-toolbar-container > .monaco-toolbar .codicon-more,
|
||||
.settings-editor > .settings-body .settings-tree-container .monaco-list-row .setting-toolbar-container:hover > .monaco-toolbar .codicon-more,
|
||||
.settings-editor > .settings-body .settings-tree-container .monaco-list-row .setting-toolbar-container > .monaco-toolbar .active .codicon-more {
|
||||
opacity: 1;
|
||||
|
||||
@@ -374,7 +374,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
constructor(
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
|
||||
@IPreferencesService private readonly preferencesService: IPreferencesService,
|
||||
@IWorkspaceContextService private readonly workpsaceContextService: IWorkspaceContextService,
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@ILabelService labelService: ILabelService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
) {
|
||||
@@ -410,8 +410,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
});
|
||||
|
||||
this.updatePreferencesEditorMenuItem();
|
||||
this._register(workpsaceContextService.onDidChangeWorkbenchState(() => this.updatePreferencesEditorMenuItem()));
|
||||
this._register(workpsaceContextService.onDidChangeWorkspaceFolders(() => this.updatePreferencesEditorMenuItemForWorkspaceFolders()));
|
||||
this._register(workspaceContextService.onDidChangeWorkbenchState(() => this.updatePreferencesEditorMenuItem()));
|
||||
this._register(workspaceContextService.onDidChangeWorkspaceFolders(() => this.updatePreferencesEditorMenuItemForWorkspaceFolders()));
|
||||
|
||||
extensionService.whenInstalledExtensionsRegistered()
|
||||
.then(() => {
|
||||
@@ -434,7 +434,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
|
||||
private updatePreferencesEditorMenuItem() {
|
||||
const commandId = '_workbench.openWorkspaceSettingsEditor';
|
||||
if (this.workpsaceContextService.getWorkbenchState() === WorkbenchState.WORKSPACE && !CommandsRegistry.getCommand(commandId)) {
|
||||
if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.WORKSPACE && !CommandsRegistry.getCommand(commandId)) {
|
||||
CommandsRegistry.registerCommand(commandId, () => this.preferencesService.openWorkspaceSettings(false));
|
||||
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
command: {
|
||||
@@ -454,11 +454,11 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
}
|
||||
|
||||
private updatePreferencesEditorMenuItemForWorkspaceFolders() {
|
||||
for (const folder of this.workpsaceContextService.getWorkspace().folders) {
|
||||
for (const folder of this.workspaceContextService.getWorkspace().folders) {
|
||||
const commandId = `_workbench.openFolderSettings.${folder.uri.toString()}`;
|
||||
if (!CommandsRegistry.getCommand(commandId)) {
|
||||
CommandsRegistry.registerCommand(commandId, () => {
|
||||
if (this.workpsaceContextService.getWorkbenchState() === WorkbenchState.FOLDER) {
|
||||
if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.FOLDER) {
|
||||
return this.preferencesService.openWorkspaceSettings(false);
|
||||
} else {
|
||||
return this.preferencesService.openFolderSettings(folder.uri, false);
|
||||
|
||||
@@ -204,7 +204,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
|
||||
createEditor(parent: HTMLElement): void {
|
||||
parent.setAttribute('tabindex', '-1');
|
||||
this.rootElement = DOM.append(parent, $('.settings-editor'));
|
||||
this.rootElement = DOM.append(parent, $('.settings-editor', { tabindex: '-1' }));
|
||||
|
||||
this.createHeader(this.rootElement);
|
||||
this.createBody(this.rootElement);
|
||||
|
||||
@@ -37,7 +37,7 @@ import { IContextMenuService, IContextViewService } from 'vs/platform/contextvie
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { errorForeground, focusBorder, foreground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { errorForeground, focusBorder, foreground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, transparent } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { attachButtonStyler, attachInputBoxStyler, attachSelectBoxStyler, attachStyler } from 'vs/platform/theme/common/styler';
|
||||
import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { ITOCEntry } from 'vs/workbench/contrib/preferences/browser/settingsLayout';
|
||||
@@ -394,15 +394,12 @@ export abstract class AbstractSettingRenderer extends Disposable implements ITre
|
||||
});
|
||||
toolbar.setActions([], this.settingActions)();
|
||||
|
||||
// change icon from ellipsis to gear
|
||||
let icon = container.querySelector('.codicon-more');
|
||||
if (icon) {
|
||||
(<HTMLElement>icon).classList.add('codicon-gear');
|
||||
}
|
||||
|
||||
const button = container.querySelector('.toolbar-toggle-more');
|
||||
const button = container.querySelector('.codicon-more');
|
||||
if (button) {
|
||||
(<HTMLElement>button).tabIndex = -1;
|
||||
|
||||
// change icon from ellipsis to gear
|
||||
(<HTMLElement>button).classList.add('codicon-gear');
|
||||
}
|
||||
|
||||
return toolbar;
|
||||
@@ -416,7 +413,6 @@ export abstract class AbstractSettingRenderer extends Disposable implements ITre
|
||||
const setting = element.setting;
|
||||
|
||||
DOM.toggleClass(template.containerElement, 'is-configured', element.isConfigured);
|
||||
DOM.toggleClass(template.containerElement, 'is-expanded', true);
|
||||
template.containerElement.setAttribute(AbstractSettingRenderer.SETTING_KEY_ATTR, element.setting.key);
|
||||
template.containerElement.setAttribute(AbstractSettingRenderer.SETTING_ID_ATTR, element.id);
|
||||
|
||||
@@ -1219,7 +1215,7 @@ export class SettingTreeRenderers {
|
||||
}
|
||||
|
||||
showContextMenu(element: SettingsTreeSettingElement, settingDOMElement: HTMLElement): void {
|
||||
const toolbarElement = settingDOMElement.querySelector('.toolbar-toggle-more');
|
||||
const toolbarElement = settingDOMElement.querySelector('.monaco-toolbar');
|
||||
if (toolbarElement) {
|
||||
this._contextMenuService.showContextMenu({
|
||||
getActions: () => this.settingActions,
|
||||
@@ -1544,20 +1540,20 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
|
||||
this.getHTMLElement().classList.add(treeClass);
|
||||
|
||||
this.disposables.push(attachStyler(themeService, {
|
||||
listActiveSelectionBackground: 'transparent',
|
||||
listActiveSelectionBackground: transparent(Color.white, 0),
|
||||
listActiveSelectionForeground: foreground,
|
||||
listFocusAndSelectionBackground: 'transparent',
|
||||
listFocusAndSelectionBackground: transparent(Color.white, 0),
|
||||
listFocusAndSelectionForeground: foreground,
|
||||
listFocusBackground: 'transparent',
|
||||
listFocusBackground: transparent(Color.white, 0),
|
||||
listFocusForeground: foreground,
|
||||
listHoverForeground: foreground,
|
||||
listHoverBackground: 'transparent',
|
||||
listHoverOutline: 'transparent',
|
||||
listFocusOutline: 'transparent',
|
||||
listInactiveSelectionBackground: 'transparent',
|
||||
listHoverBackground: transparent(Color.white, 0),
|
||||
listHoverOutline: transparent(Color.white, 0),
|
||||
listFocusOutline: transparent(Color.white, 0),
|
||||
listInactiveSelectionBackground: transparent(Color.white, 0),
|
||||
listInactiveSelectionForeground: foreground,
|
||||
listInactiveFocusBackground: 'transparent',
|
||||
listInactiveFocusOutline: 'transparent'
|
||||
listInactiveFocusBackground: transparent(Color.white, 0),
|
||||
listInactiveFocusOutline: transparent(Color.white, 0)
|
||||
}, colors => {
|
||||
this.style(colors);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user