mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 04:34:08 +01:00
* Eigenes Fenster: sshTermy läuft ohne Terminal (Prototyp) Neues Paket internal/gui: Die bubbletea-Oberfläche schreibt in den eingebauten Emulator (termemu), ein Ebiten-Fenster zeichnet das Zellraster mit eingebetteter Cascadia Mono NF (Ersatz DejaVu Sans Mono), Rahmen- und Blockzeichen selbst gezeichnet. Tasten werden als xterm/CSI-u kodiert, so kommen Alt+Enter, ⇧F-Tasten und Strg+Leertaste immer an. Maus, Einfügen, OSC-52-Zwischenablage, Schriftgröße (Strg +/-/0), HiDPI. Start: automatisch ohne Terminal (Doppelklick unter Windows, .app auf dem Mac), -window erzwingt, -tui verhindert. Fenster schließen beendet sauber wie Strg+Q (ui.WindowClosedMsg). Ebiten baut dank purego ohne cgo, die Release-Builds bleiben unverändert. install.sh: .app startet das Fenster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhY2jMdZmccTS8ce6p * Golden-Bilder der Palette: 33 Einstellungen (war schon auf main veraltet) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhY2jMdZmccTS8ce6p * Eigenes Fenster: zweites Fenster für ⇧F10, Bilder pixelgenau, Ablegen, Emoji - ⇧F10 im eigenen Fenster öffnet ein zweites eigenes Fenster (sshtermy attach <ordner> -window, detach.Dial/Client, ohne Konsole). - kitty-Bilder mit Platzhaltern zeichnet das Fenster selbst (images.go), ui.EnablePixelImages im Fensterbetrieb. - Dateien ins Fenster ziehen: echte Pfade aus Ebitens DroppedFiles, als eingefügter Text wie in Windows Terminal → Hochladen-Menü (ui/drop.go). - Noto Emoji als zweite Ersatzschrift. - Windows: leere Konsole beim Doppelklick schon in init() verstecken. - Kurzreferenz: Grundschrift 8,6 pt, die deutsche Seite 2 lief über. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhY2jMdZmccTS8ce6p --------- Co-authored-by: Claude <noreply@anthropic.com>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package gui
|
|
|
|
import "testing"
|
|
|
|
// Linien müssen an den Zellrändern ankommen, sonst entstehen Lücken in Rahmen.
|
|
func TestBoxGlyphEdges(t *testing.T) {
|
|
const w, h = 9, 19
|
|
cases := map[rune][4]bool{ // oben, rechts, unten, links erreicht
|
|
'─': {false, true, false, true},
|
|
'│': {true, false, true, false},
|
|
'┌': {false, true, true, false},
|
|
'┼': {true, true, true, true},
|
|
'╭': {false, true, true, false},
|
|
'╯': {true, false, false, true},
|
|
'═': {false, true, false, true},
|
|
}
|
|
for r, want := range cases {
|
|
img := boxGlyph(r, w, h)
|
|
if img == nil {
|
|
t.Fatalf("%c: kein Bild", r)
|
|
}
|
|
any := func(x0, y0, x1, y1 int) bool {
|
|
for y := y0; y < y1; y++ {
|
|
for x := x0; x < x1; x++ {
|
|
if img.AlphaAt(x, y).A > 100 {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
got := [4]bool{any(0, 0, w, 1), any(w-1, 0, w, h), any(0, h-1, w, h), any(0, 0, 1, h)}
|
|
if got != want {
|
|
t.Errorf("%c: Ränder %v, erwartet %v", r, got, want)
|
|
}
|
|
}
|
|
if boxGlyph('a', w, h) != nil {
|
|
t.Error("normale Buchstaben gehören der Schrift")
|
|
}
|
|
if img := boxGlyph('█', w, h); img.AlphaAt(0, 0).A != 255 || img.AlphaAt(w-1, h-1).A != 255 {
|
|
t.Error("█ muss die Zelle ganz füllen")
|
|
}
|
|
}
|