Răsfoiți Sursa

Remove decorative background patches from the main content area.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 lună în urmă
părinte
comite
eca457488c

+ 0 - 8
gramora/Utilities/AppTheme.swift

@@ -123,14 +123,6 @@ enum AppTheme {
             : Color(red: 0.82, green: 0.93, blue: 0.88)
     }
 
-    static var blobColor: Color {
-        Color(red: 0.0, green: 0.651, blue: 0.494).opacity(isDark ? 0.10 : 0.07)
-    }
-
-    static var dotColor: Color {
-        Color(red: 0.0, green: 0.651, blue: 0.494).opacity(isDark ? 0.18 : 0.14)
-    }
-
     static var cardShadow: Color {
         Color.black.opacity(isDark ? 0.24 : 0.06)
     }

+ 0 - 113
gramora/Views/Components/BackgroundDecorations.swift

@@ -1,113 +0,0 @@
-import SwiftUI
-
-struct BackgroundDecorations: View {
-    // Proportions derived from the original 859×720 content-area layout.
-    private enum Layout {
-        static let topRightWaveSize = CGSize(width: 0.489, height: 0.444)
-        static let topRightWaveCenter = CGPoint(x: 0.896, y: 0.222)
-
-        static let bottomLeftWaveSize = CGSize(width: 0.442, height: 0.389)
-        static let bottomLeftWaveCenter = CGPoint(x: 0.081, y: 0.861)
-
-        static let bottomLeftDotsCenter = CGPoint(x: 0.034, y: 0.889)
-        static let topRightDotsCenter = CGPoint(x: 1.012, y: 0.194)
-    }
-
-    var body: some View {
-        GeometryReader { geometry in
-            let width = geometry.size.width
-            let height = geometry.size.height
-
-            ZStack {
-                AppTheme.background
-
-                OrganicWave()
-                    .fill(AppTheme.blobColor)
-                    .frame(
-                        width: width * Layout.topRightWaveSize.width,
-                        height: height * Layout.topRightWaveSize.height
-                    )
-                    .position(
-                        x: width * Layout.topRightWaveCenter.x,
-                        y: height * Layout.topRightWaveCenter.y
-                    )
-
-                OrganicWave()
-                    .fill(AppTheme.blobColor.opacity(0.85))
-                    .frame(
-                        width: width * Layout.bottomLeftWaveSize.width,
-                        height: height * Layout.bottomLeftWaveSize.height
-                    )
-                    .scaleEffect(x: -1, y: 1)
-                    .position(
-                        x: width * Layout.bottomLeftWaveCenter.x,
-                        y: height * Layout.bottomLeftWaveCenter.y
-                    )
-
-                DotGrid()
-                    .position(
-                        x: width * Layout.bottomLeftDotsCenter.x,
-                        y: height * Layout.bottomLeftDotsCenter.y
-                    )
-                    .opacity(0.55)
-
-                DotGrid()
-                    .position(
-                        x: width * Layout.topRightDotsCenter.x,
-                        y: height * Layout.topRightDotsCenter.y
-                    )
-                    .opacity(0.45)
-            }
-        }
-        .frame(maxWidth: .infinity, maxHeight: .infinity)
-        .ignoresSafeArea()
-        .clipped()
-    }
-}
-
-private struct OrganicWave: Shape {
-    func path(in rect: CGRect) -> Path {
-        var path = Path()
-        let w = rect.width
-        let h = rect.height
-
-        path.move(to: CGPoint(x: w * 0.1, y: h * 0.85))
-        path.addCurve(
-            to: CGPoint(x: w * 0.9, y: h * 0.15),
-            control1: CGPoint(x: w * 0.05, y: h * 0.35),
-            control2: CGPoint(x: w * 0.55, y: h * 0.0)
-        )
-        path.addCurve(
-            to: CGPoint(x: w * 0.65, y: h * 0.95),
-            control1: CGPoint(x: w * 1.1, y: h * 0.45),
-            control2: CGPoint(x: w * 0.85, y: h * 1.05)
-        )
-        path.addCurve(
-            to: CGPoint(x: w * 0.1, y: h * 0.85),
-            control1: CGPoint(x: w * 0.35, y: h * 0.75),
-            control2: CGPoint(x: w * 0.0, y: h * 1.0)
-        )
-        path.closeSubpath()
-        return path
-    }
-}
-
-private struct DotGrid: View {
-    private let columns = 5
-    private let rows = 5
-    private let spacing: CGFloat = 10
-
-    var body: some View {
-        VStack(spacing: spacing) {
-            ForEach(0..<rows, id: \.self) { _ in
-                HStack(spacing: spacing) {
-                    ForEach(0..<columns, id: \.self) { _ in
-                        Circle()
-                            .fill(AppTheme.dotColor)
-                            .frame(width: 4, height: 4)
-                    }
-                }
-            }
-        }
-    }
-}

+ 10 - 14
gramora/Views/MainView.swift

@@ -33,23 +33,19 @@ struct MainView: View {
                         .frame(maxHeight: .infinity)
                         .ignoresSafeArea(edges: .top)
 
-                    ZStack {
-                        BackgroundDecorations()
-
-                        Group {
-                            if viewModel.isShowingSettings {
-                                SettingsView(
-                                    onClose: viewModel.hideSettings,
-                                    themeManager: themeManager
-                                )
+                    Group {
+                        if viewModel.isShowingSettings {
+                            SettingsView(
+                                onClose: viewModel.hideSettings,
+                                themeManager: themeManager
+                            )
+                            .transition(.opacity)
+                        } else {
+                            contentView
                                 .transition(.opacity)
-                            } else {
-                                contentView
-                                    .transition(.opacity)
-                            }
                         }
-                        .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
                     }
+                    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
                     .frame(maxWidth: .infinity, maxHeight: .infinity)
                     .background(AppTheme.background)
                     .ignoresSafeArea(edges: .top)