diff --git a/LoopCaregiver/LoopCaregiver/Views/Actions/BolusInputView.swift b/LoopCaregiver/LoopCaregiver/Views/Actions/BolusInputView.swift index c2ddf8c0..1cd85241 100644 --- a/LoopCaregiver/LoopCaregiver/Views/Actions/BolusInputView.swift +++ b/LoopCaregiver/LoopCaregiver/Views/Actions/BolusInputView.swift @@ -85,29 +85,33 @@ struct BolusInputView: View { Form { if let recommendedBolus = remoteDataSource.recommendedBolus { LabeledContent { - Text(LocalizationUtils.presentableStringFromBolusAmount(recommendedBolus)) - Text("U") - .frame(width: unitFrameWidth) + HStack { + Text(LocalizationUtils.presentableStringFromBolusAmount(recommendedBolus)) + Text("U") + .frame(width: unitFrameWidth) + } } label: { Text("Recommended Bolus") } } LabeledContent { - TextField( - "0", - text: $bolusAmount - ) - .multilineTextAlignment(.trailing) - .keyboardType(.decimalPad) - .focused($bolusInputViewIsFocused) - .onAppear(perform: { - bolusInputViewIsFocused = true - if let recommendedBolus = remoteDataSource.recommendedBolus { - bolusAmount = LocalizationUtils.presentableStringFromBolusAmount(recommendedBolus) - } - }) - Text("U") - .frame(width: unitFrameWidth) + HStack { + TextField( + "0", + text: $bolusAmount + ) + .multilineTextAlignment(.trailing) + .keyboardType(.decimalPad) + .focused($bolusInputViewIsFocused) + .onAppear(perform: { + bolusInputViewIsFocused = true + if let recommendedBolus = remoteDataSource.recommendedBolus { + bolusAmount = LocalizationUtils.presentableStringFromBolusAmount(recommendedBolus) + } + }) + Text("U") + .frame(width: unitFrameWidth) + } } label: { Text("Bolus") } diff --git a/LoopCaregiver/LoopCaregiver/Views/Actions/CarbInputView.swift b/LoopCaregiver/LoopCaregiver/Views/Actions/CarbInputView.swift index b2166b54..1b26ac94 100644 --- a/LoopCaregiver/LoopCaregiver/Views/Actions/CarbInputView.swift +++ b/LoopCaregiver/LoopCaregiver/Views/Actions/CarbInputView.swift @@ -90,18 +90,20 @@ struct CarbInputView: View { var carbEntryForm: some View { Form { LabeledContent { - TextField( - "0", - text: $carbInput - ) - .multilineTextAlignment(.trailing) - .keyboardType(.decimalPad) - .focused($carbInputViewIsFocused) - .onAppear(perform: { - carbInputViewIsFocused = true - }) - Text("g") - .frame(width: unitFrameWidth) + HStack { + TextField( + "0", + text: $carbInput + ) + .multilineTextAlignment(.trailing) + .keyboardType(.decimalPad) + .focused($carbInputViewIsFocused) + .onAppear(perform: { + carbInputViewIsFocused = true + }) + Text("g") + .frame(width: unitFrameWidth) + } } label: { Text("Amount Consumed") } @@ -210,15 +212,17 @@ struct CarbInputView: View { } LabeledContent { - TextField( - "", - text: $absorption - ) - .multilineTextAlignment(.trailing) - .keyboardType(.decimalPad) - .focused($absorptionInputFieldIsFocused) - Text("hr") - .frame(width: unitFrameWidth) + HStack { + TextField( + "", + text: $absorption + ) + .multilineTextAlignment(.trailing) + .keyboardType(.decimalPad) + .focused($absorptionInputFieldIsFocused) + Text("hr") + .frame(width: unitFrameWidth) + } } label: { Text("Absorption Time") }