Browse Source

Update Bolus Cancel Button (#352)

* Update Bolus Cancel Button

* Refactor

---------

Co-authored-by: Jon Mårtensson <jon.m@live.se>
tmhastings 2 years ago
parent
commit
780ff6f0c8
1 changed files with 10 additions and 8 deletions
  1. 10 8
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 10 - 8
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -315,14 +315,16 @@ extension Home {
                 }
 
                 if let progress = state.bolusProgress {
-                    Text("Bolusing")
-                        .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
-                    ProgressView(value: Double(progress))
-                        .progressViewStyle(BolusProgressViewStyle())
-                        .padding(.trailing, 8)
-                        .onTapGesture {
-                            state.cancelBolus()
-                        }
+                    HStack {
+                        Text("Bolusing")
+                            .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
+                        ProgressView(value: Double(progress))
+                            .progressViewStyle(BolusProgressViewStyle())
+                            .padding(.trailing, 8)
+                    }
+                    .onTapGesture {
+                        state.cancelBolus()
+                    }
                 }
             }
             .frame(maxWidth: .infinity, maxHeight: 30)