瀏覽代碼

Improve layout of Meal presets.
Added a light blue colour.

(cherry picked from commit 2c361fcedacb0fe8d683ff186c6edc2dd14d63c8)

Jon Mårtensson 3 年之前
父節點
當前提交
eb527eeeba

+ 38 - 0
FreeAPS/Resources/Assets.xcassets/Colors/minus.colorset/Contents.json

@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0.976",
+          "green" : "0.839",
+          "red" : "0.635"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0.976",
+          "green" : "0.839",
+          "red" : "0.635"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

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

@@ -61,4 +61,5 @@ extension Color {
     static let darkerBlue = Color("DarkerBlue")
     static let loopPink = Color("LoopPink")
     static let lemon = Color("Lemon")
+    static let minus = Color("minus")
 }

+ 2 - 2
FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift

@@ -138,7 +138,7 @@ extension AddCarbs {
                         ))
                         .buttonStyle(BorderlessButtonStyle())
                         .frame(maxWidth: .infinity, alignment: .trailing)
-                        .accentColor(.tempBasal)
+                        .accentColor(.minus)
                     Button {
                         state.carbs += ((state.selection?.carbs ?? 0) as NSDecimalNumber) as Decimal
                         state.fat += ((state.selection?.fat ?? 0) as NSDecimalNumber) as Decimal
@@ -146,7 +146,7 @@ extension AddCarbs {
                     label: { Text("[ +1 ]") }
                         .disabled(state.selection == nil)
                         .buttonStyle(BorderlessButtonStyle())
-                        .accentColor(.darkerBlue)
+                        .accentColor(.blue)
                 }
             }
         }