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

Simplify UI for slider

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

+ 8 - 8
FreeAPS/Sources/Modules/AddTempTarget/View/AddTempTargetRootView.swift

@@ -57,7 +57,7 @@ extension AddTempTarget {
                                 }
                             )
                             HStack {
-                                Text("Insulin \(state.percentage.formatted(.number)) %")
+                                Text("\(state.percentage.formatted(.number)) % Insulin")
                                     .foregroundColor(isEditing ? .orange : .blue)
                                     .font(.largeTitle)
                             }
@@ -71,13 +71,13 @@ extension AddTempTarget {
 
                             HStack {
                                 Text(
-                                    NSLocalizedString("Target glucose", comment: "") +
-                                        (
-                                            state
-                                                .units == .mmolL ?
-                                                ": \(state.computeTarget().asMmolL.formatted(.number.grouping(.never).rounded().precision(.fractionLength(1)))) mmol/L" :
-                                                ": \(state.computeTarget().formatted(.number.grouping(.never).rounded().precision(.fractionLength(0)))) mg/dl"
-                                        )
+                                    (
+                                        state
+                                            .units == .mmolL ?
+                                            "\(state.computeTarget().asMmolL.formatted(.number.grouping(.never).rounded().precision(.fractionLength(1)))) mmol/L" :
+                                            "\(state.computeTarget().formatted(.number.grouping(.never).rounded().precision(.fractionLength(0)))) mg/dl"
+                                    )
+                                        + NSLocalizedString("  Target Glucose", comment: "")
                                 )
                                 .foregroundColor(.green)
                             }