Просмотр исходного кода

Watch big BG update

(cherry picked from commit d2266904fe16f4a4de95a265a5455532c644a5f1)
Jon Mårtensson 3 лет назад
Родитель
Сommit
b852f61fed

+ 2 - 2
FreeAPS/Sources/Modules/AddTempTarget/AddTempTargetStateModel.swift

@@ -21,7 +21,7 @@ extension AddTempTarget {
         @Published var viewPercantage = false
         @Published var hbt: Double = 160
         @Published var saveSettings: Bool = false
-        
+
         private(set) var units: GlucoseUnits = .mmolL
 
         override func subscribe() {
@@ -43,7 +43,7 @@ extension AddTempTarget {
                 lowTarget = lowTarget.asMgdL
                 highTarget = highTarget.asMgdL
             }
-            
+
             let entry = TempTarget(
                 name: TempTarget.custom,
                 createdAt: date,

+ 9 - 11
FreeAPSWatch WatchKit Extension/Views/MainView.swift

@@ -173,22 +173,20 @@ struct MainView: View {
                 Text(state.trend)
                     .scaledToFill()
                     .minimumScaleFactor(0.5)
-            }
-            Text(state.delta).font(.caption2).foregroundColor(.gray)
-
-            Spacer()
+            }.padding(.bottom, 35)
+            // Text(state.delta).font(.caption2).foregroundColor(.gray)
             Spacer()
 
             HStack {
-                Circle().stroke(color, lineWidth: 5).frame(width: 26, height: 26).padding(10)
-            }
+                Circle().stroke(color, lineWidth: 5).frame(width: 20, height: 20).padding(10)
 
-            if state.lastLoopDate != nil {
-                Text(timeString).font(.caption2).foregroundColor(.gray)
-            } else {
-                Text("--").font(.caption2).foregroundColor(.gray)
+                if state.lastLoopDate != nil {
+                    Text(timeString).font(.caption2).foregroundColor(.gray)
+                } else {
+                    Text("--").font(.caption2).foregroundColor(.gray)
+                }
             }
-        } // .scaleEffect(isDetectingLongPressOfBG ? 3 : 1)
+        }
         .gesture(longPresBGs)
     }