From dd8adb2c593eaf96ecd7108c071364ce89320726 Mon Sep 17 00:00:00 2001 From: Rafal Kolarz Date: Fri, 23 Oct 2026 01:54:25 +0100 Subject: [PATCH] Refine floating card depth and reserve carousel indicator space --- Kasztelan.xcodeproj/project.pbxproj | 4 +-- Kasztelan/CardView.swift | 13 ++------- Kasztelan/MainTabView.swift | 2 +- Kasztelan/Theme.swift | 45 +++++++---------------------- Kasztelan/WalletView.swift | 4 +-- 5 files changed, 17 insertions(+), 51 deletions(-) diff --git a/Kasztelan.xcodeproj/project.pbxproj b/Kasztelan.xcodeproj/project.pbxproj index ce8d639..6f4fa3c 100644 --- a/Kasztelan.xcodeproj/project.pbxproj +++ b/Kasztelan.xcodeproj/project.pbxproj @@ -292,7 +292,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Kasztelan/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink"; @@ -316,7 +316,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Kasztelan/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink"; diff --git a/Kasztelan/CardView.swift b/Kasztelan/CardView.swift index dcc1aa5..0a2f14a 100644 --- a/Kasztelan/CardView.swift +++ b/Kasztelan/CardView.swift @@ -23,7 +23,7 @@ struct CardView: View { GeometryReader { geometry in let compact = geometry.size.height < 680 - VStack(alignment: .leading, spacing: compact ? 10 : 18) { + VStack(alignment: .leading, spacing: compact ? 8 : 12) { Text(model.text("Witaj, ", "Hello, ") + firstName) .font(compact ? .title.bold() : .largeTitle.bold()) .lineLimit(1) @@ -36,7 +36,7 @@ struct CardView: View { summary(compact: compact) } .padding(.horizontal, 20) - .padding(.vertical, compact ? 8 : 14) + .padding(.top, compact ? 0 : 2) .frame(width: geometry.size.width, height: geometry.size.height, alignment: .top) } .background(.clear) @@ -92,13 +92,6 @@ struct CardView: View { GlassDepthDeck { loyaltyCardFace(compact: compact) } - .scaleEffect(1.01) - .rotation3DEffect( - .degrees(-6), - axis: (x: 1, y: -0.10, z: 0), - anchor: .center, - perspective: 0.72 - ) } private func loyaltyCardFace(compact: Bool) -> some View { @@ -106,7 +99,7 @@ struct CardView: View { Image("Logo") .resizable() .scaledToFit() - .frame(maxHeight: compact ? 54 : 76) + .frame(maxHeight: compact ? 66 : 88) if model.cardNumber.count == 13 { VStack(spacing: compact ? 4 : 8) { CardBarcodeView(digits: model.cardNumber) diff --git a/Kasztelan/MainTabView.swift b/Kasztelan/MainTabView.swift index 3399ba3..4fd5f42 100644 --- a/Kasztelan/MainTabView.swift +++ b/Kasztelan/MainTabView.swift @@ -54,7 +54,7 @@ struct AppToolbar: ToolbarContent { Image("Logo") .resizable() .scaledToFit() - .frame(width: 170, height: 44) + .frame(width: 190, height: 46) .shadow(color: KTheme.pink.opacity(0.28), radius: 12) } ToolbarItem(placement: .topBarTrailing) { LanguageButton() } diff --git a/Kasztelan/Theme.swift b/Kasztelan/Theme.swift index 9ef7b5d..5eac3c1 100644 --- a/Kasztelan/Theme.swift +++ b/Kasztelan/Theme.swift @@ -71,53 +71,28 @@ struct GlassDepthDeck: View { var body: some View { ZStack { RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .fill(.ultraThinMaterial) - .overlay { - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .stroke(KTheme.cyan.opacity(0.22), lineWidth: 1) - } - .scaleEffect(x: 0.80, y: 0.91) - .offset(y: 38) - .blur(radius: 2) - .opacity(0.42) - - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .fill(.ultraThinMaterial) - .overlay { - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .stroke(KTheme.purple.opacity(0.34), lineWidth: 1) - } - .scaleEffect(x: 0.88, y: 0.95) - .offset(y: 27) - .blur(radius: 1.2) - .opacity(0.62) - - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .fill(.thinMaterial) - .overlay { - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) - .stroke(KTheme.pink.opacity(0.32), lineWidth: 1) - } - .scaleEffect(x: 0.95, y: 0.98) - .offset(y: 15) - .opacity(0.80) + .fill(.black.opacity(0.50)) + .scaleEffect(x: 0.94, y: 0.97) + .offset(y: 18) + .blur(radius: 18) content - .shadow(color: .black.opacity(0.58), radius: 38, y: 26) - .shadow(color: KTheme.pink.opacity(0.34), radius: 26, y: 10) + .shadow(color: .black.opacity(0.66), radius: 30, y: 20) + .shadow(color: KTheme.purple.opacity(0.30), radius: 24, x: -8, y: 8) + .shadow(color: KTheme.pink.opacity(0.30), radius: 20, x: 10, y: 4) RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) .stroke( LinearGradient( - colors: [.white.opacity(0.62), .clear, KTheme.purple.opacity(0.42)], + colors: [.white.opacity(0.76), .white.opacity(0.10), KTheme.purple.opacity(0.46)], startPoint: .topLeading, endPoint: .bottomTrailing ), - lineWidth: 1.3 + lineWidth: 1.6 ) .allowsHitTesting(false) } - .padding(.bottom, 38) + .padding(.bottom, 20) } } diff --git a/Kasztelan/WalletView.swift b/Kasztelan/WalletView.swift index a3bd836..4a9a41d 100644 --- a/Kasztelan/WalletView.swift +++ b/Kasztelan/WalletView.swift @@ -51,7 +51,7 @@ struct WalletView: View { .contentShape(Rectangle()) .simultaneousGesture(carouselGesture(width: geometry.size.width)) } - .overlay(alignment: .bottom) { pageIndicator } + .safeAreaInset(edge: .bottom, spacing: 0) { pageIndicator } .clipped() } } @@ -326,8 +326,6 @@ private struct DiscountCardView: View { .stroke(.white.opacity(0.28), lineWidth: 1) } } - .scaleEffect(1.01) - .rotation3DEffect(.degrees(-6), axis: (x: 1, y: -0.10, z: 0), perspective: 0.72) Text(model.text("Dostępna offline • zaszyfrowana synchronizacja", "Available offline • encrypted sync")) .font(.footnote)