From 7885badbfd8ea5acfbafc1392bdf740ec18230df Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 5 Aug 2017 16:57:00 +0200 Subject: [PATCH] make line padding adjustable (fixes #141) --- terminus-terminal/src/components/terminalTab.component.ts | 7 +++++++ terminus-terminal/src/config.ts | 1 + terminus-terminal/src/hterm.userCSS.scss | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/terminus-terminal/src/components/terminalTab.component.ts b/terminus-terminal/src/components/terminalTab.component.ts index 7926e545..997c2a34 100644 --- a/terminus-terminal/src/components/terminalTab.component.ts +++ b/terminus-terminal/src/components/terminalTab.component.ts @@ -214,6 +214,13 @@ export class TerminalTabComponent extends BaseTabComponent { return ret } } + + const _measureCharacterSize = hterm.scrollPort_.measureCharacterSize.bind(hterm.scrollPort_) + hterm.scrollPort_.measureCharacterSize = () => { + let size = _measureCharacterSize() + size.height += this.config.store.terminal.linePadding + return size + } } attachIOHandlers (io: any) { diff --git a/terminus-terminal/src/config.ts b/terminus-terminal/src/config.ts index fa5ec0f1..e85c2a21 100644 --- a/terminus-terminal/src/config.ts +++ b/terminus-terminal/src/config.ts @@ -4,6 +4,7 @@ export class TerminalConfigProvider extends ConfigProvider { defaults = { terminal: { fontSize: 14, + linePadding: 0, bell: 'off', bracketedPaste: false, background: 'theme', diff --git a/terminus-terminal/src/hterm.userCSS.scss b/terminus-terminal/src/hterm.userCSS.scss index 610717ef..a279dd58 100644 --- a/terminus-terminal/src/hterm.userCSS.scss +++ b/terminus-terminal/src/hterm.userCSS.scss @@ -10,6 +10,11 @@ x-screen { transition: 0.125s ease background; } +x-row > span { + display: inline-block; + height: inherit; +} + @font-face { font-family: "monospace-fallback"; src: url(fonts/Meslo.otf) format("opentype");