Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1957 debug console follows existing editor font settings #68779

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,6 @@
.monaco-workbench .monaco-list-row .expression {
overflow: hidden;
text-overflow: ellipsis;
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
}

.monaco-workbench.mac .monaco-list-row .expression {
font-size: 11px;
}

.monaco-workbench.windows .monaco-list-row .expression,
.monaco-workbench.linux .monaco-list-row .expression {
font-size: 13px;
}

.monaco-workbench .monaco-list-row .expression .value {
Expand Down
13 changes: 0 additions & 13 deletions src/vs/workbench/contrib/debug/browser/media/repl.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
}

.repl .surveyor {
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
position: absolute;
display: inline-block;
width : auto;
Expand Down Expand Up @@ -41,11 +40,6 @@
cursor: pointer;
}

.monaco-workbench.mac .repl .repl-tree .input.expression,
.monaco-workbench.mac .repl .repl-tree .output.expression {
font-size: 12px;
}

.repl .repl-tree .output.expression.value-and-source {
display: flex;
}
Expand All @@ -65,13 +59,6 @@
cursor: text;
}

.monaco-workbench.windows .repl .repl-tree .monaco-list-row .input.expression,
.monaco-workbench.windows .repl .repl-tree .monaco-list-row .output.expression,
.monaco-workbench.linux .repl .repl-tree .monaco-list-row .input.expression,
.monaco-workbench.linux .repl .repl-tree .monaco-list-row .output.expression {
font-size: 14px;
}

.repl .repl-tree .output.expression > .value {
margin-left: 0px;
}
Expand Down
15 changes: 15 additions & 0 deletions src/vs/workbench/contrib/debug/electron-browser/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { RunOnceScheduler } from 'vs/base/common/async';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { FuzzyScore, createMatches } from 'vs/base/common/filters';
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';

const $ = dom.$;

Expand Down Expand Up @@ -161,6 +162,11 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
this.refreshReplElements(true);
}
}));
this._register(this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('editor')) {
this.updateStyles();
}
}));
}

get isReadonly(): boolean {
Expand Down Expand Up @@ -266,6 +272,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
}

layout(dimension: dom.Dimension): void {
this.updateStyles();
this.dimension = dimension;
if (this.tree) {
this.replDelegate.setWidth(dimension.width - 25, this.characterWidth);
Expand Down Expand Up @@ -369,6 +376,14 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
this.selectSession();
}

updateStyles(): void {
super.updateStyles();
this.container.style.fontSize =
this.configurationService.getValue<IEditorOptions>('editor').fontSize + 'px';
this.container.style.fontFamily =
this.configurationService.getValue<IEditorOptions>('editor').fontFamily;
}

private createReplInput(container: HTMLElement): void {
this.replInputContainer = dom.append(container, $('.repl-input-wrapper'));

Expand Down