mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fixed 1 color picker bug made home UI padding
This commit is contained in:
parent
aecbe2ac35
commit
90b5dae3ba
12 changed files with 58 additions and 122 deletions
|
|
@ -31,7 +31,6 @@ struct TabButton: View {
|
|||
var body: some View {
|
||||
Button(action: onClick) {
|
||||
Image(systemName: icon)
|
||||
.padding(.horizontal, 15)
|
||||
.contentShape(Capsule())
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue