fix the wierd scaling when tapping an ansi color

This commit is contained in:
neon443
2025-07-03 19:11:06 +01:00
parent b9327f993e
commit d5a45d78c4
2 changed files with 6 additions and 6 deletions

View File

@@ -11,10 +11,9 @@ struct AnsiPickerView: View {
@ObservedObject var hostsManager: HostsManager
var body: some View {
ZStack {
ZStack(alignment: .center) {
RoundedRectangle(cornerRadius: 15)
.aspectRatio(CGSize(width: 4, height: 1), contentMode: .fit)
.foregroundStyle(hostsManager.selectedTheme.foreground.suiColor.opacity(0.7))
.foregroundStyle(hostsManager.selectedTheme.foreground.suiColor.opacity(0.5))
GeometryReader { geo in
VStack(spacing: 0) {
ForEach(0...1, id: \.self) { row in
@@ -32,13 +31,15 @@ struct AnsiPickerView: View {
hostsManager.selectAnsi(index)
}
}
.frame(minWidth: 20, minHeight: 20)
.aspectRatio(1, contentMode: .fit)
}
}
}
}
.aspectRatio(4, contentMode: .fit)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.aspectRatio(CGSize(width: 4, height: 1), contentMode: .fit)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding(5)
}
}

View File

@@ -111,5 +111,4 @@ struct ThemePreview: View {
canModify: true
)
.border(Color.red)
.scaleEffect(2)
}