mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 17:23:51 -05:00
Merge from vscode 70dc55955d586ebd427658b43cdb344f2047f9c2 (#6789)
This commit is contained in:
@@ -46,6 +46,9 @@ enum Settings {
|
||||
PANEL_POSITION = 'workbench.panel.defaultLocation',
|
||||
|
||||
ZEN_MODE_RESTORE = 'zenMode.restore',
|
||||
|
||||
// TODO @misolori update this when finished
|
||||
OCTICONS_UPDATE_ENABLED = 'workbench.octiconsUpdate.enabled',
|
||||
}
|
||||
|
||||
enum Storage {
|
||||
@@ -173,6 +176,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
wasSideBarVisible: false,
|
||||
wasPanelVisible: false,
|
||||
transitionDisposables: new DisposableStore()
|
||||
},
|
||||
|
||||
// TODO @misolori update this when finished
|
||||
octiconsUpdate: {
|
||||
enabled: false
|
||||
}
|
||||
};
|
||||
|
||||
@@ -314,6 +322,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
const newMenubarVisibility = this.configurationService.getValue<MenuBarVisibility>(Settings.MENUBAR_VISIBLE);
|
||||
this.setMenubarVisibility(newMenubarVisibility, !!skipLayout);
|
||||
|
||||
// TODO @misolori update this when finished
|
||||
const newOcticonsUpdate = this.configurationService.getValue<boolean>(Settings.OCTICONS_UPDATE_ENABLED);
|
||||
this.setOcticonsUpdate(newOcticonsUpdate);
|
||||
|
||||
}
|
||||
|
||||
private setSideBarPosition(position: Position): void {
|
||||
@@ -426,6 +438,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
// Zen mode enablement
|
||||
this.state.zenMode.restore = this.storageService.getBoolean(Storage.ZEN_MODE_ENABLED, StorageScope.WORKSPACE, false) && this.configurationService.getValue(Settings.ZEN_MODE_RESTORE);
|
||||
|
||||
// TODO @misolori update this when finished
|
||||
this.state.octiconsUpdate.enabled = this.configurationService.getValue<boolean>(Settings.OCTICONS_UPDATE_ENABLED);
|
||||
this.setOcticonsUpdate(this.state.octiconsUpdate.enabled);
|
||||
|
||||
}
|
||||
|
||||
private resolveEditorsToOpen(fileService: IFileService): Promise<IResourceEditor[]> | IResourceEditor[] {
|
||||
@@ -729,6 +745,19 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
}
|
||||
}
|
||||
|
||||
// TODO @misolori update this when finished
|
||||
private setOcticonsUpdate(enabled: boolean): void {
|
||||
this.state.octiconsUpdate.enabled = enabled;
|
||||
|
||||
// Update DOM
|
||||
if (enabled) {
|
||||
document.body.dataset.octiconsUpdate = 'enabled';
|
||||
} else {
|
||||
document.body.dataset.octiconsUpdate = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected createWorkbenchLayout(instantiationService: IInstantiationService): void {
|
||||
const titleBar = this.getPart(Parts.TITLEBAR_PART);
|
||||
const editorPart = this.getPart(Parts.EDITOR_PART);
|
||||
|
||||
@@ -171,7 +171,7 @@ export class PlaceHolderViewletActivityAction extends ViewletActivityAction {
|
||||
super({ id, name: id, cssClass: `extensionViewlet-placeholder-${id.replace(/\./g, '-')}` }, viewletService, layoutService, telemetryService);
|
||||
|
||||
const iconClass = `.monaco-workbench .activitybar .monaco-action-bar .action-label.${this.class}`; // Generate Placeholder CSS to show the icon in the activity bar
|
||||
DOM.createCSSRule(iconClass, `-webkit-mask: url('${DOM.asDomUri(iconUrl) || ''}') no-repeat 50% 50%; -webkit-mask-size: 24px;`);
|
||||
DOM.createCSSRule(iconClass, `-webkit-mask: ${DOM.asCSSUrl(iconUrl)} no-repeat 50% 50%; -webkit-mask-size: 24px;`);
|
||||
}
|
||||
|
||||
setActivity(activity: IActivity): void {
|
||||
|
||||
@@ -22,8 +22,8 @@ export function getIconClass(iconPath: { dark: URI; light?: URI; } | undefined):
|
||||
iconClass = iconPathToClass[key];
|
||||
} else {
|
||||
iconClass = iconClassGenerator.nextId();
|
||||
dom.createCSSRule(`.${iconClass}`, `background-image: url("${dom.asDomUri(iconPath.light || iconPath.dark).toString()}")`);
|
||||
dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: url("${dom.asDomUri(iconPath.dark).toString()}")`);
|
||||
dom.createCSSRule(`.${iconClass}`, `background-image: ${dom.asCSSUrl(iconPath.light || iconPath.dark)}`);
|
||||
dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: ${dom.asCSSUrl(iconPath.dark)}`);
|
||||
iconPathToClass[key] = iconClass;
|
||||
}
|
||||
|
||||
|
||||
@@ -756,7 +756,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
||||
templateData.resourceLabel.setResource({ name: label, description }, { title, hideIcon: true, extraClasses: ['custom-view-tree-node-item-resourceLabel'], matches: createMatches(element.filterData) });
|
||||
}
|
||||
|
||||
templateData.icon.style.backgroundImage = iconUrl ? `url('${DOM.asDomUri(iconUrl).toString(true)}')` : '';
|
||||
templateData.icon.style.backgroundImage = iconUrl ? DOM.asCSSUrl(iconUrl) : '';
|
||||
DOM.toggleClass(templateData.icon, 'custom-view-tree-node-item-icon', !!iconUrl);
|
||||
templateData.actionBar.context = <TreeViewItemHandleArg>{ $treeViewId: this.treeViewId, $treeItemHandle: node.handle };
|
||||
templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false });
|
||||
|
||||
@@ -41,6 +41,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { getThemeTypeSelector, DARK, HIGH_CONTRAST, LIGHT } from 'vs/platform/theme/common/themeService';
|
||||
import { InMemoryUserDataProvider } from 'vs/workbench/services/userData/common/inMemoryUserDataProvider';
|
||||
import { registerWindowDriver } from 'vs/platform/driver/browser/driver';
|
||||
import { StaticExtensionsService, IStaticExtensionsService } from 'vs/workbench/services/extensions/common/staticExtensions';
|
||||
|
||||
class CodeRendererMain extends Disposable {
|
||||
|
||||
@@ -145,6 +146,10 @@ class CodeRendererMain extends Disposable {
|
||||
const fileService = this._register(new FileService(logService));
|
||||
serviceCollection.set(IFileService, fileService);
|
||||
|
||||
// Static Extensions
|
||||
const staticExtensions = new StaticExtensionsService(this.configuration.staticExtensions || []);
|
||||
serviceCollection.set(IStaticExtensionsService, staticExtensions);
|
||||
|
||||
let userDataProvider: IFileSystemProvider | undefined = this.configuration.userDataProvider;
|
||||
const connection = remoteAgentService.getConnection();
|
||||
if (connection) {
|
||||
|
||||
@@ -239,6 +239,11 @@ import { isMacintosh, isWindows, isLinux, isWeb } from 'vs/base/common/platform'
|
||||
'description': nls.localize('workbench.useExperimentalGridLayout', "Enables the grid layout for the workbench. This setting may enable additional layout options for workbench components."),
|
||||
'default': true,
|
||||
'scope': ConfigurationScope.APPLICATION
|
||||
},
|
||||
'workbench.octiconsUpdate.enabled': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
'description': nls.localize('workbench.octiconsUpdate.enabled', "Controls the visibility of the new Octicons style in the workbench.")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user