mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fixed wierd border issues
This commit is contained in:
@@ -14,32 +14,30 @@ struct AnsiPickerView: View {
|
|||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
RoundedRectangle(cornerRadius: 15)
|
RoundedRectangle(cornerRadius: 15)
|
||||||
.foregroundStyle(hostsManager.selectedTheme.foreground.suiColor.opacity(0.5))
|
.foregroundStyle(hostsManager.selectedTheme.foreground.suiColor.opacity(0.5))
|
||||||
GeometryReader { geo in
|
VStack(spacing: 0) {
|
||||||
VStack(spacing: 0) {
|
ForEach(0...1, id: \.self) { row in
|
||||||
ForEach(0...1, id: \.self) { row in
|
HStack(spacing: 0) {
|
||||||
HStack(spacing: 0) {
|
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
|
var isSelected: Bool { hostsManager.selectedAnsi == index }
|
||||||
var isSelected: Bool { hostsManager.selectedAnsi == index }
|
ZStack {
|
||||||
ZStack {
|
Rectangle()
|
||||||
Rectangle()
|
.fill(hostsManager.selectedTheme.background.suiColor)
|
||||||
.fill(hostsManager.selectedTheme.background.suiColor)
|
RoundedRectangle(cornerRadius: isSelected ? 5 : 0)
|
||||||
RoundedRectangle(cornerRadius: isSelected ? 5 : 0)
|
.fill(hostsManager.selectedTheme.ansi[index].suiColor)
|
||||||
.fill(hostsManager.selectedTheme.ansi[index].suiColor)
|
.padding(isSelected ? 5 : 0)
|
||||||
.padding(isSelected ? 5 : 0)
|
.onTapGesture {
|
||||||
.onTapGesture {
|
hostsManager.selectAnsi(index)
|
||||||
hostsManager.selectAnsi(index)
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
.frame(minWidth: 20, minHeight: 20)
|
|
||||||
.aspectRatio(1, contentMode: .fit)
|
|
||||||
}
|
}
|
||||||
|
.frame(minWidth: 20, minHeight: 20)
|
||||||
|
.aspectRatio(1, contentMode: .fit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.aspectRatio(4, contentMode: .fit)
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
|
||||||
}
|
}
|
||||||
|
.aspectRatio(4, contentMode: .fit)
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||||
.padding(5)
|
.padding(5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ struct ThemeManagerView: View {
|
|||||||
}
|
}
|
||||||
HStack {
|
HStack {
|
||||||
AnsiPickerView(hostsManager: hostsManager)
|
AnsiPickerView(hostsManager: hostsManager)
|
||||||
.frame(width: 400, height: 100)
|
// .frame(width: 400, height: 100)
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
|
|||||||
Reference in New Issue
Block a user