Sfoglia il codice sorgente

Change ISF color for charts and in Onboarding from red to cyan

Deniz Cengiz 1 anno fa
parent
commit
801bb2eb3e

+ 4 - 4
Trio/Sources/Modules/ISFEditor/View/ISFEditorRootView.swift

@@ -208,8 +208,8 @@ extension ISFEditor {
                     ).foregroundStyle(
                         .linearGradient(
                             colors: [
-                                Color.red.opacity(0.6),
-                                Color.red.opacity(0.1)
+                                Color.cyan.opacity(0.6),
+                                Color.cyan.opacity(0.1)
                             ],
                             startPoint: .bottom,
                             endPoint: .top
@@ -217,10 +217,10 @@ extension ISFEditor {
                     ).alignsMarkStylesWithPlotArea()
 
                     LineMark(x: .value("End Date", startDate), y: .value("ISF", displayValueFloat ?? 0))
-                        .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
+                        .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
 
                     LineMark(x: .value("Start Date", endDate), y: .value("ISF", displayValueFloat ?? 0))
-                        .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
+                        .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
                 }
             }
             .chartXAxis {

+ 5 - 9
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/TherapySettings/InsulinSensitivityStepView.swift

@@ -88,12 +88,8 @@ struct InsulinSensitivityStepView: View {
                             Text(
                                 "\(aboveTarget.description) \(state.units.rawValue) / \(isfValue.description) \(state.units.rawValue)/\(String(localized: "U", comment: "Insulin unit abbreviation")) = \(String(format: "%.1f", Double(insulinNeeded))) \(String(localized: "U", comment: "Insulin unit abbreviation"))"
                             )
-//                            Text(
-//                                "\(numberFormatter.string(from: aboveTarget as NSNumber) ?? "--") \(state.units.rawValue) / \(numberFormatter.string(from: isfValue as NSNumber) ?? "--") \(state.units.rawValue)/\(String(localized: "U", comment: "Insulin unit abbreviation")) = \(String(format: "%.1f", Double(insulinNeeded)))" +
-//                                    " " + String(localized: "U", comment: "Insulin unit abbreviation")
-//                            )
                             .font(.system(.body, design: .monospaced))
-                            .foregroundColor(.red)
+                            .foregroundColor(.cyan)
                             .padding()
                             .frame(maxWidth: .infinity, alignment: .center)
                             .background(Color.chart.opacity(0.65))
@@ -165,8 +161,8 @@ struct InsulinSensitivityStepView: View {
                 ).foregroundStyle(
                     .linearGradient(
                         colors: [
-                            Color.red.opacity(0.6),
-                            Color.red.opacity(0.1)
+                            Color.cyan.opacity(0.6),
+                            Color.cyan.opacity(0.1)
                         ],
                         startPoint: .bottom,
                         endPoint: .top
@@ -174,10 +170,10 @@ struct InsulinSensitivityStepView: View {
                 ).alignsMarkStylesWithPlotArea()
 
                 LineMark(x: .value("End Date", startDate), y: .value("ISF", displayValue))
-                    .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
+                    .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
 
                 LineMark(x: .value("Start Date", endDate), y: .value("ISF", displayValue))
-                    .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
+                    .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
             }
         }
         .id(refreshUI) // Force chart update

+ 1 - 1
Trio/Sources/Modules/Onboarding/View/OnboardingView+Util.swift

@@ -318,7 +318,7 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
         case .carbRatio:
             return Color.orange
         case .insulinSensitivity:
-            return Color.red
+            return Color.cyan
         }
     }