From e8fefe4ebe5d430cf3c7abf09265e772a0f1468d Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 25 Sep 2026 18:36:51 +0200 Subject: [PATCH] Terminal: schwarzen Rand im Innenabstand entfernt (xterm-viewport transparent, Hintergrund in Terminalfarbe) Co-Authored-By: Claude Opus 5.5 --- src/renderer/app.js | 2 ++ src/renderer/styles.css | 1 + 2 files changed, 3 insertions(+) diff --git a/src/renderer/app.js b/src/renderer/app.js index c054279..203908c 100644 --- a/src/renderer/app.js +++ b/src/renderer/app.js @@ -1018,6 +1018,7 @@ class TerminalSession { this.term.loadAddon(this.search); this.term.loadAddon(new WebLinksAddon.WebLinksAddon((_e, url) => api.call('shell:open', url))); this.term.open($('.term', this.el)); + $('.term', this.el).style.background = termTheme().background; // Innenabstand in Terminalfarbe this.term.onData((d) => { if (this.alive) api.ssh.write(this.id, d); else if (d === '\r' && this.ended) this.reconnect(); }); this.term.onResize(({ cols, rows }) => { if (this.alive) api.ssh.resize(this.id, cols, rows); }); this.term.onSelectionChange(() => { if (settings().copyOnSelect && this.term.hasSelection()) api.call('clipboard:write', this.term.getSelection()); }); @@ -1091,6 +1092,7 @@ class TerminalSession { applySettings() { const st = settings(); Object.assign(this.term.options, { fontFamily: st.fontFamily, fontSize: st.fontSize, cursorStyle: st.cursorStyle, cursorBlink: st.cursorBlink, scrollback: st.scrollback, theme: termTheme() }); + $('.term', this.el).style.background = termTheme().background; this.doFit(); } diff --git a/src/renderer/styles.css b/src/renderer/styles.css index 0f76772..9f75f55 100644 --- a/src/renderer/styles.css +++ b/src/renderer/styles.css @@ -238,6 +238,7 @@ body.in-session #sidebar { display: none; } .session .term { flex: 1; min-width: 0; min-height: 0; overflow: hidden; } /* Innenabstand am .xterm-Element: FitAddon zieht nur dessen Padding ab (am Elternelement würde es mitgezählt) */ .session .term .xterm { height: 100%; padding: 8px 0 4px 10px; } +.session .term .xterm-viewport { background-color: transparent !important; } /* sonst schwarzer Rand im Innenabstand */ .session .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; background: var(--overlay); z-index: 3; } .session .overlay .spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; } .session .overlay .msg { color: var(--muted); max-width: 520px; text-align: center; }