Bladeren bron

Try new black and grey colors

Jon Mårtensson 5 jaren geleden
bovenliggende
commit
b9adfbba63

+ 28 - 0
FreeAPS/Resources/Assets.xcassets/Colors/Background.colorset/Contents.json

@@ -0,0 +1,28 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "platform" : "ios",
+        "reference" : "systemBackgroundColor"
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "platform" : "ios",
+        "reference" : "systemBackgroundColor"
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 1 - 0
FreeAPS/Sources/Helpers/Color+Extensions.swift

@@ -10,4 +10,5 @@ extension Color {
     static let zt = Color("ZT")
     static let tempBasal = Color("TempBasal")
     static let basal = Color("Basal")
+    static let backgroundColor = Color("Background")
 }

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -166,7 +166,7 @@ struct MainChartView: View {
         }
         .frame(width: fullGlucoseWidth(viewWidth: fullSize.width) + additionalWidth(viewWidth: fullSize.width))
         .frame(maxHeight: Config.basalHeight)
-        .background(Color.secondary.opacity(0.1))
+//        .background(Color.secondary.opacity(0.1))
         .onChange(of: tempBasals) { _ in
             calculateBasalPoints(fullSize: fullSize)
         }

+ 4 - 4
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -182,9 +182,10 @@ extension Home {
                     header
                         .frame(maxHeight: 70)
                         .padding(.top, geo.safeAreaInsets.top)
-                        .background(Color.gray.opacity(0.2))
+//                        .background(Color.gray.opacity(0.2))
 
                     infoPanal
+                        .background(Color.gray.opacity(0.2))
                     MainChartView(
                         glucose: $viewModel.glucose,
                         suggestion: $viewModel.suggestion,
@@ -202,10 +203,9 @@ extension Home {
                     .modal(for: .dataTable, from: self)
 
                     legendPanal
-
+                        .background(Color.gray.opacity(0.2))
                     ZStack {
-                        Rectangle().fill(Color.gray.opacity(0.2)).frame(height: 50 + geo.safeAreaInsets.bottom)
-
+                        Rectangle().fill(Color.backgroundColor).frame(height: 50 + geo.safeAreaInsets.bottom)
                         HStack {
                             Button { viewModel.showModal(for: .addCarbs) }
                             label: {