Polish all files (excl. CoreBrowserTerminal/Viewport)

This commit is contained in:
Daniel Imms
2024-07-10 08:08:02 -07:00
parent ade5591d60
commit d1d25a5bf7
5 changed files with 17 additions and 15 deletions
+2 -4
View File
@@ -172,10 +172,8 @@ if (config.addon) {
};
outConfig = {
...outConfig,
entryPoints: [
`src/**/*.ts`
],
outdir: 'out-esbuild/',
entryPoints: ['src/**/*.ts'],
outdir: 'out-esbuild/'
};
outTestConfig = {
...outConfig,
+1
View File
@@ -25,6 +25,7 @@ function findUnusedSymbols(
const allFilesInBase = (
fs.readdirSync('src/vs/base', { recursive: true, withFileTypes: true })
.filter(e => e.isFile())
// @ts-ignore HACK: This is only available in Node 20
.map(e => `${e.parentPath}/${e.name}`.replace(/\\/g, '/'))
);
const unusedFilesInBase = allFilesInBase.filter(e => !usedFilesInBase.includes(e));
-1
View File
@@ -97,7 +97,6 @@
"mustache": "^4.2.0",
"node-pty": "1.1.0-beta5",
"nyc": "^15.1.0",
"semver": "^7.6.2",
"source-map-loader": "^3.0.0",
"source-map-support": "^0.5.20",
"ts-loader": "^9.3.1",
@@ -8,6 +8,10 @@ import { ICoreBrowserService, IRenderService, IThemeService } from 'browser/serv
import { Disposable, toDisposable } from 'common/Lifecycle';
import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services';
const enum Constants {
OVERVIEW_RULER_BORDER_WIDTH = 1
}
// Helper objects to avoid excessive calculation and garbage collection during rendering. These are
// static values for each render and can be accessed using the decoration position as the key.
const drawHeight = {
@@ -98,8 +102,8 @@ export class OverviewRulerRenderer extends Disposable {
private _refreshDrawConstants(): void {
// width
const outerWidth = Math.floor((this._canvas.width - 1) / 3);
const innerWidth = Math.ceil((this._canvas.width - 1) / 3);
const outerWidth = Math.floor((this._canvas.width - Constants.OVERVIEW_RULER_BORDER_WIDTH) / 3);
const innerWidth = Math.ceil((this._canvas.width - Constants.OVERVIEW_RULER_BORDER_WIDTH) / 3);
drawWidth.full = this._canvas.width;
drawWidth.left = outerWidth;
drawWidth.center = innerWidth;
@@ -107,10 +111,10 @@ export class OverviewRulerRenderer extends Disposable {
// height
this._refreshDrawHeightConstants();
// x
drawX.full = 1;
drawX.left = 1;
drawX.center = 1 + drawWidth.left;
drawX.right = 1 + drawWidth.left + drawWidth.center;
drawX.full = Constants.OVERVIEW_RULER_BORDER_WIDTH;
drawX.left = Constants.OVERVIEW_RULER_BORDER_WIDTH;
drawX.center = Constants.OVERVIEW_RULER_BORDER_WIDTH + drawWidth.left;
drawX.right = Constants.OVERVIEW_RULER_BORDER_WIDTH + drawWidth.left + drawWidth.center;
}
private _refreshDrawHeightConstants(): void {
@@ -171,7 +175,7 @@ export class OverviewRulerRenderer extends Disposable {
private _renderRulerOutline(): void {
this._ctx.fillStyle = this._themeService.colors.overviewRulerBorder.css;
this._ctx.fillRect(0, 0, 1, this._canvas.height);
this._ctx.fillRect(0, 0, Constants.OVERVIEW_RULER_BORDER_WIDTH, this._canvas.height);
}
private _renderColorZone(zone: IColorZone): void {
+3 -3
View File
@@ -23,12 +23,12 @@ interface IRestoreColorSet {
const DEFAULT_FOREGROUND = css.toColor('#ffffff');
const DEFAULT_BACKGROUND = css.toColor('#000000');
const DEFAULT_CURSOR = css.toColor('#ffffff');
const DEFAULT_CURSOR_ACCENT = css.toColor('#000000');
const DEFAULT_CURSOR_ACCENT = DEFAULT_BACKGROUND;
const DEFAULT_SELECTION = {
css: 'rgba(255, 255, 255, 0.3)',
rgba: 0xFFFFFF4D
};
const DEFAULT_OVERVIEW_RULER_BORDER = css.toColor('#000000');
const DEFAULT_OVERVIEW_RULER_BORDER = DEFAULT_FOREGROUND;
export class ThemeService extends Disposable implements IThemeService {
public serviceBrand: undefined;
@@ -61,7 +61,7 @@ export class ThemeService extends Disposable implements IThemeService {
scrollbarSliderBackground: color.opacity(DEFAULT_FOREGROUND, 0.2),
scrollbarSliderHoverBackground: color.opacity(DEFAULT_FOREGROUND, 0.4),
scrollbarSliderActiveBackground: color.opacity(DEFAULT_FOREGROUND, 0.5),
overviewRulerBorder: DEFAULT_OVERVIEW_RULER_BORDER,
overviewRulerBorder: DEFAULT_FOREGROUND,
ansi: DEFAULT_ANSI_COLORS.slice(),
contrastCache: this._contrastCache,
halfContrastCache: this._halfContrastCache