Jon Mårtensson пре 4 година
родитељ
комит
ab0c980cfe
1 измењених фајлова са 16 додато и 16 уклоњено
  1. 16 16
      FreeAPSWatch WatchKit Extension/Views/MainView.swift

+ 16 - 16
FreeAPSWatch WatchKit Extension/Views/MainView.swift

@@ -60,16 +60,16 @@ struct MainView: View {
             }
             Spacer()
             HStack {
+                Text(iobFormatter.string(from: (state.cob ?? 0) as NSNumber)!).font(.caption2)
+                Text("g").foregroundColor(.loopGreen)
+                Spacer()
                 Text(iobFormatter.string(from: (state.iob ?? 0) as NSNumber)!).font(.caption2)
-                Text(" U").foregroundColor(.insulin)
+                Text("U").foregroundColor(.insulin)
 
                 Spacer()
-                Text(iobFormatter.string(from: (state.cob ?? 0) as NSNumber)!).font(.caption2)
-                Text(" g").foregroundColor(.loopYellow)
-                Spacer()
                 Spacer()
             }
-            Spacer()
+//            Spacer()
         }.padding()
     }
 
@@ -86,6 +86,17 @@ struct MainView: View {
                     .foregroundColor(.loopGreen)
             }
 
+            NavigationLink(isActive: $state.isBolusViewActive) {
+                BolusView()
+                    .environmentObject(state)
+            } label: {
+                Image("bolus", bundle: nil)
+                    .renderingMode(.template)
+                    .resizable()
+                    .frame(width: 24, height: 24)
+                    .foregroundColor(.insulin)
+            }
+
             NavigationLink(isActive: $state.isTempTargetViewActive) {
                 TempTargetsView()
                     .environmentObject(state)
@@ -101,17 +112,6 @@ struct MainView: View {
                     }
                 }
             }
-
-            NavigationLink(isActive: $state.isBolusViewActive) {
-                BolusView()
-                    .environmentObject(state)
-            } label: {
-                Image("bolus", bundle: nil)
-                    .renderingMode(.template)
-                    .resizable()
-                    .frame(width: 24, height: 24)
-                    .foregroundColor(.insulin)
-            }
         }
     }