Fix font/line height size issues

This commit is contained in:
Daniel Imms
2017-09-10 10:52:53 -07:00
parent ab8ebea781
commit 27c1918eb7
2 changed files with 32 additions and 40 deletions
@@ -70,40 +70,6 @@
text-decoration: underline;
}
/* Terminal actions */
/* Light theme */
.monaco-workbench .terminal-action.kill { background: url('kill.svg') center center no-repeat; }
.monaco-workbench .terminal-action.new { background: url('new.svg') center center no-repeat; }
/* Dark theme / HC theme */
.vs-dark .monaco-workbench .terminal-action.kill, .hc-black .monaco-workbench .terminal-action.kill { background: url('kill-inverse.svg') center center no-repeat; }
.vs-dark .monaco-workbench .terminal-action.new, .hc-black .monaco-workbench .terminal-action.new { background: url('new-inverse.svg') center center no-repeat; }
.vs-dark .monaco-workbench.mac .panel.integrated-terminal .xterm-rows,
.hc-black .monaco-workbench.mac .panel.integrated-terminal .xterm-rows {
cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text;
}
.monaco-workbench .quick-open-terminal-configure {
background-image: url('configure.svg');
}
.vs-dark .monaco-workbench .quick-open-terminal-configure,
.hc-black .monaco-workbench .quick-open-terminal-configure {
background-image: url('configure-inverse.svg');
}
/* Previously in xterm.css*/
.monaco-workbench .panel.integrated-terminal .xterm {
position: relative;
height: 100%;
@@ -136,3 +102,26 @@
/* Override the general vscode style applies `opacity:1!important` to textareas */
opacity: 0 !important;
}
/* Terminal actions */
/* Light theme */
.monaco-workbench .terminal-action.kill { background: url('kill.svg') center center no-repeat; }
.monaco-workbench .terminal-action.new { background: url('new.svg') center center no-repeat; }
/* Dark theme / HC theme */
.vs-dark .monaco-workbench .terminal-action.kill, .hc-black .monaco-workbench .terminal-action.kill { background: url('kill-inverse.svg') center center no-repeat; }
.vs-dark .monaco-workbench .terminal-action.new, .hc-black .monaco-workbench .terminal-action.new { background: url('new-inverse.svg') center center no-repeat; }
.vs-dark .monaco-workbench.mac .panel.integrated-terminal .xterm-rows,
.hc-black .monaco-workbench.mac .panel.integrated-terminal .xterm-rows {
cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text;
}
.monaco-workbench .quick-open-terminal-configure {
background-image: url('configure.svg');
}
.vs-dark .monaco-workbench .quick-open-terminal-configure,
.hc-black .monaco-workbench .quick-open-terminal-configure {
background-image: url('configure-inverse.svg');
}
@@ -886,13 +886,16 @@ export class TerminalInstance implements ITerminalInstance {
return;
}
if (this._xterm) {
// TODO: Support lineHeight
// TODO: Support lineHeight, font* changes
// TODO: Only do this when there's a change
const font = this._configHelper.getFont();
this._xterm.setOption('lineHeight', font.lineHeight);
this._xterm.setOption('fontSize', font.fontSize);
this._xterm.setOption('fontFamily', font.fontFamily);
if (this._xterm.getOption('lineHeight') !== font.lineHeight) {
this._xterm.setOption('lineHeight', font.lineHeight);
}
if (this._xterm.getOption('fontSize') !== font.fontSize) {
this._xterm.setOption('fontSize', font.fontSize);
}
if (this._xterm.getOption('fontFamily') !== font.fontFamily) {
this._xterm.setOption('fontFamily', font.fontFamily);
}
this._xterm.resize(this._cols, this._rows);
this._xterm.element.style.width = terminalWidth + 'px';