From e2cb313ddc64ac04783c6bc8c0cfbb317847c48f Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Wed, 9 Jul 2025 11:52:47 +0100 Subject: [PATCH] cleanup, add spacers to ansi picker --- ShhShell/Themes/SwiftTerm.Color.swift | 7 +++---- ShhShell/Views/Themes/ThemeEditorView.swift | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ShhShell/Themes/SwiftTerm.Color.swift b/ShhShell/Themes/SwiftTerm.Color.swift index 6e679f8..2b02856 100644 --- a/ShhShell/Themes/SwiftTerm.Color.swift +++ b/ShhShell/Themes/SwiftTerm.Color.swift @@ -51,10 +51,9 @@ extension SwiftTerm.Color { self.init(red: 0, green: 0, blue: 0) return } - let r = components[0] ?? 0 - let g = components[1] ?? 0 - let b = components[2] ?? 0 - print(r,g,b) + let r = components[0] + let g = components[1] + let b = components[2] self.init(red: UInt16(r*65535), green: UInt16(g*65535), blue: UInt16(b*65535)) } diff --git a/ShhShell/Views/Themes/ThemeEditorView.swift b/ShhShell/Views/Themes/ThemeEditorView.swift index d7e3b0c..32302c8 100644 --- a/ShhShell/Views/Themes/ThemeEditorView.swift +++ b/ShhShell/Views/Themes/ThemeEditorView.swift @@ -43,10 +43,12 @@ struct ThemeEditorView: View { Section("Ansi Colors") { ForEach(0...1, id: \.self) { row in HStack { + Spacer() ForEach(1...8, id: \.self) { col in let index = (col + (row * 8)) - 1 ColorPicker("", selection: $theme.ansi[index].suiColor, supportsOpacity: false) .labelsHidden() + Spacer() } } }