mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Fix dimensions of terminal panes
They were too large for their containers
This commit is contained in:
parent
99709e6d71
commit
744376e0cf
|
@ -27,18 +27,18 @@
|
|||
display: none;
|
||||
margin: 0 20px;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .split-view-view:not(:first-of-type) .terminal-wrapper {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .split-view-view:not(:last-of-type) .terminal-wrapper {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .terminal-wrapper.active {
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: 2px; /* Matches padding-bottom on .terminal-outer-container */
|
||||
top: 0;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:first-of-type) .terminal-wrapper {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:last-of-type) .terminal-wrapper {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.monaco-workbench .panel.integrated-terminal .xterm a:not(.xterm-invalid-link) {
|
||||
/* To support message box sizing */
|
||||
|
@ -52,7 +52,7 @@
|
|||
.monaco-workbench .panel.integrated-terminal .xterm-viewport {
|
||||
margin-right: -20px;
|
||||
}
|
||||
.monaco-workbench .panel.integrated-terminal .split-view-view:not(:only-of-type) .xterm-viewport {
|
||||
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:only-of-type) .xterm-viewport {
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ export class TerminalInstance implements ITerminalInstance {
|
|||
// it gets removed and then added back to the DOM (resetting scrollTop to 0).
|
||||
// Upstream issue: https://github.com/sourcelair/xterm.js/issues/291
|
||||
if (this._xterm) {
|
||||
// TODO: See if we can live without this now
|
||||
this._xterm.emit('scroll', this._xterm.buffer.ydisp);
|
||||
}
|
||||
}
|
||||
|
@ -260,10 +261,10 @@ export class TerminalInstance implements ITerminalInstance {
|
|||
const wrapperElementStyle = getComputedStyle(this._wrapperElement);
|
||||
const marginLeft = parseInt(wrapperElementStyle.marginLeft.split('px')[0], 10);
|
||||
const marginRight = parseInt(wrapperElementStyle.marginRight.split('px')[0], 10);
|
||||
const paddingBottom = parseInt(wrapperElementStyle.paddingBottom.split('px')[0], 10);
|
||||
const bottom = parseInt(wrapperElementStyle.bottom.split('px')[0], 10);
|
||||
|
||||
const innerWidth = width - (marginLeft + marginRight);
|
||||
const innerHeight = height - paddingBottom;
|
||||
const innerWidth = width - marginLeft - marginRight;
|
||||
const innerHeight = height - bottom;
|
||||
|
||||
TerminalInstance._lastKnownDimensions = new Dimension(innerWidth, innerHeight);
|
||||
return TerminalInstance._lastKnownDimensions;
|
||||
|
|
Loading…
Reference in a new issue