mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
cleanup, add spacers to ansi picker
This commit is contained in:
@@ -51,10 +51,9 @@ extension SwiftTerm.Color {
|
|||||||
self.init(red: 0, green: 0, blue: 0)
|
self.init(red: 0, green: 0, blue: 0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let r = components[0] ?? 0
|
let r = components[0]
|
||||||
let g = components[1] ?? 0
|
let g = components[1]
|
||||||
let b = components[2] ?? 0
|
let b = components[2]
|
||||||
print(r,g,b)
|
|
||||||
self.init(red: UInt16(r*65535), green: UInt16(g*65535), blue: UInt16(b*65535))
|
self.init(red: UInt16(r*65535), green: UInt16(g*65535), blue: UInt16(b*65535))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,12 @@ struct ThemeEditorView: View {
|
|||||||
Section("Ansi Colors") {
|
Section("Ansi Colors") {
|
||||||
ForEach(0...1, id: \.self) { row in
|
ForEach(0...1, id: \.self) { row in
|
||||||
HStack {
|
HStack {
|
||||||
|
Spacer()
|
||||||
ForEach(1...8, id: \.self) { col in
|
ForEach(1...8, id: \.self) { col in
|
||||||
let index = (col + (row * 8)) - 1
|
let index = (col + (row * 8)) - 1
|
||||||
ColorPicker("", selection: $theme.ansi[index].suiColor, supportsOpacity: false)
|
ColorPicker("", selection: $theme.ansi[index].suiColor, supportsOpacity: false)
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user