[lcenavigationview-adoption] Fix black nav bar background, add Cart title wrap
setNavigationBarBackgroundColor was never called on the 15 screens
adopted in 3456184, so it stayed at the default .clear and the real
window background (black) showed through. Set it to
AppColors.backgroundLight on all of them, matching each screen's own
actual content background. Also wraps CartView's title in
LCENavigationView for consistency with the rest of the app - no
setLeftButton since Cart is a tab root, no back button needed.
The other reported bug (empty right-button slot rendering a visible
glass circle) is fixed in LCEssentials itself (separate repo,
commit 8b0f650 on fix/navigation/liquid-glass-button-chrome) but
won't take visual effect here until that's published and this
repo's Package.resolved is bumped to point at it.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
#if canImport(LCEssentials)
|
||||
import LCEssentials
|
||||
#endif
|
||||
|
||||
struct CartView: View {
|
||||
@Binding var appState: AppState
|
||||
@@ -13,14 +16,16 @@ struct CartView: View {
|
||||
@State var isLoadingDeliveryFee = false
|
||||
|
||||
var body: some View {
|
||||
LCENavigationView {
|
||||
content
|
||||
}
|
||||
.setTitle(text: Text("Meu Carrinho").font(AppTypography.heading1).foregroundStyle(AppColors.textPrimary))
|
||||
.setNavigationBarBackgroundColor(AppColors.backgroundLight)
|
||||
}
|
||||
|
||||
private var content: some View {
|
||||
ScrollView(showsIndicators: false) {
|
||||
VStack(spacing: 16) {
|
||||
Text("Meu Carrinho")
|
||||
.font(AppTypography.heading1)
|
||||
.foregroundStyle(AppColors.textPrimary)
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.padding(.top, 20)
|
||||
|
||||
if appState.cart.items.isEmpty {
|
||||
VStack(spacing: 10) {
|
||||
Text("Seu carrinho está vazio")
|
||||
|
||||
Reference in New Issue
Block a user