Skip to content

Commit

Permalink
List, Tree: Make sure sub-pixel antialiasing works across all lists a…
Browse files Browse the repository at this point in the history
…nd trees

#84715
  • Loading branch information
isidorn committed Nov 18, 2019
1 parent 95a7255 commit 8eaf977
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/debug/browser/breakpointsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
import { ILabelService } from 'vs/platform/label/common/label';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const $ = dom.$;

Expand Down Expand Up @@ -85,6 +86,9 @@ export class BreakpointsView extends ViewletPanel {
getPosInSet: (_: IEnablement, index: number) => index,
getRole: (breakpoint: IEnablement) => 'checkbox',
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
},
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});

Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/debug/browser/callStackView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { isSessionAttach } from 'vs/workbench/contrib/debug/common/debugUtils';
import { STOP_ID, STOP_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_LABEL, STEP_INTO_ID, STEP_OUT_LABEL, STEP_OUT_ID, PAUSE_ID, PAUSE_LABEL, CONTINUE_ID, CONTINUE_LABEL } from 'vs/workbench/contrib/debug/browser/debugCommands';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { CollapseAction } from 'vs/workbench/browser/viewlet';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const $ = dom.$;

Expand Down Expand Up @@ -161,7 +162,10 @@ export class CallStackView extends ViewletPanel {
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
}
},
expandOnlyOnTwistieClick: true
expandOnlyOnTwistieClick: true,
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});

this.tree.setInput(this.debugService.getModel());
Expand Down
5 changes: 4 additions & 1 deletion src/vs/workbench/contrib/debug/browser/debugHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export class DebugHoverWidget implements IContentWidget {
ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"),
accessibilityProvider: new DebugHoverAccessibilityProvider(),
mouseSupport: false,
horizontalScrolling: true
horizontalScrolling: true,
overrideStyles: {
listBackground: editorHoverBackground
}
});

this.valueContainer = $('.value');
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { dispose } from 'vs/base/common/lifecycle';
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider';
import { ILabelService } from 'vs/platform/label/common/label';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const SMART = true;

Expand Down Expand Up @@ -440,6 +441,9 @@ export class LoadedScriptsView extends ViewletPanel {
filter: this.filter,
accessibilityProvider: new LoadedSciptsAccessibilityProvider(),
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts"),
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
}
);

Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/debug/browser/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import { RunOnceScheduler } from 'vs/base/common/async';
import { FuzzyScore, createMatches } from 'vs/base/common/filters';
import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { PANEL_BACKGROUND } from 'vs/workbench/common/theme';

const $ = dom.$;

Expand Down Expand Up @@ -428,7 +429,10 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IReplElement) => e },
horizontalScrolling: !wordWrap,
setRowLineHeight: false,
supportDynamicHeights: wordWrap
supportDynamicHeights: wordWrap,
overrideStyles: {
listBackground: PANEL_BACKGROUND
}
});
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
let lastSelectedString: string;
Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/debug/browser/variablesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabe
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { dispose } from 'vs/base/common/lifecycle';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const $ = dom.$;
let forgetScopes = true;
Expand Down Expand Up @@ -91,7 +92,10 @@ export class VariablesView extends ViewletPanel {
ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
accessibilityProvider: new VariablesAccessibilityProvider(),
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e }
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e },
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});

this.tree.setInput(this.debugService.getViewModel());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel
import { variableSetEmitter, VariablesRenderer } from 'vs/workbench/contrib/debug/browser/variablesView';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { dispose } from 'vs/base/common/lifecycle';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;

Expand Down Expand Up @@ -68,6 +69,9 @@ export class WatchExpressionsView extends ViewletPanel {
identityProvider: { getId: (element: IExpression) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e },
dnd: new WatchExpressionsDragAndDrop(this.debugService),
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});

this.tree.setInput(this.debugService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { URI } from 'vs/base/common/uri';
import { withUndefinedAsNull } from 'vs/base/common/types';
import { isWeb } from 'vs/base/common/platform';
import { IWorkingCopyService } from 'vs/workbench/services/workingCopy/common/workingCopyService';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';

const $ = dom.$;

Expand Down Expand Up @@ -214,7 +215,10 @@ export class OpenEditorsView extends ViewletPanel {
new OpenEditorRenderer(this.listLabels, this.instantiationService, this.keybindingService, this.configurationService)
], {
identityProvider: { getId: (element: OpenEditor | IEditorGroup) => element instanceof OpenEditor ? element.getId() : element.id.toString() },
dnd: new OpenEditorsDragAndDrop(this.instantiationService, this.editorGroupService)
dnd: new OpenEditorsDragAndDrop(this.instantiationService, this.editorGroupService),
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
}
});
this._register(this.list);
this._register(this.listLabels);
Expand Down

0 comments on commit 8eaf977

Please sign in to comment.