Fixed 1 color picker bug made home UI padding

This commit is contained in:
Venkatesh 2026-03-31 20:35:47 +08:00
commit 90b5dae3ba
12 changed files with 58 additions and 122 deletions

View file

@ -105,7 +105,7 @@ struct TabSelectionView: View {
return tabsArray
}
var body: some View {
HStack(spacing: 0) {
HStack(spacing: 32) {
ForEach(tabs) { tab in
let isSelected = isSelected(tab)
let activeAccent = tab.accentColor ?? .white
@ -117,23 +117,10 @@ struct TabSelectionView: View {
}
.frame(height: 26)
.foregroundStyle(isSelected ? activeAccent : .gray)
.background {
if isSelected {
Capsule()
.fill((tab.accentColor ?? Color(nsColor: .secondarySystemFill)).opacity(0.25))
.shadow(color: (tab.accentColor ?? .clear).opacity(0.4), radius: 8)
.matchedGeometryEffect(id: "capsule", in: animation)
} else {
Capsule()
.fill(Color.clear)
.matchedGeometryEffect(id: "capsule", in: animation)
.hidden()
}
}
}
}
.animation(.smooth(duration: 0.3), value: coordinator.currentView)
.clipShape(Capsule())
.onAppear {
ensureValidSelection(with: tabs)
}