瀏覽代碼

Simplify UI for slider

(cherry picked from commit b4d1cc601d0f3f70fc7af621b8e7483454954cb7)
Jon Mårtensson 3 年之前
父節點
當前提交
cb063eccd7
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      FreeAPS/Sources/Modules/AddTempTarget/View/AddTempTargetRootView.swift

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

@@ -57,7 +57,7 @@ extension AddTempTarget {
                                 }
                                 }
                             )
                             )
                             HStack {
                             HStack {
-                                Text("Insulin \(state.percentage.formatted(.number)) %")
+                                Text("\(state.percentage.formatted(.number)) % Insulin")
                                     .foregroundColor(isEditing ? .orange : .blue)
                                     .foregroundColor(isEditing ? .orange : .blue)
                                     .font(.largeTitle)
                                     .font(.largeTitle)
                             }
                             }
@@ -71,13 +71,13 @@ extension AddTempTarget {
 
 
                             HStack {
                             HStack {
                                 Text(
                                 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)
                                 .foregroundColor(.green)
                             }
                             }