cleanup, add spacers to ansi picker

This commit is contained in:
neon443
2025-07-09 11:52:47 +01:00
parent 2e74426941
commit e2cb313ddc
2 changed files with 5 additions and 4 deletions

View File

@@ -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))
}

View File

@@ -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()
}
}
}