Sfoglia il codice sorgente

chore: process feedback

bastiaanv 6 mesi fa
parent
commit
61242cf707

+ 3 - 2
LiveActivity/Views/LiveActivityView.swift

@@ -23,7 +23,8 @@ struct LiveActivityView: View {
 
 
         return Color.getDynamicGlucoseColor(
         return Color.getDynamicGlucoseColor(
             glucoseValue: Decimal(string: state.bg) ?? 100,
             glucoseValue: Decimal(string: state.bg) ?? 100,
-            highGlucoseColorValue: !hasStaticColorScheme ? hardCodedHigh : (isMgdL ? state.highGlucose : state.highGlucose.asMmolL),
+            highGlucoseColorValue: !hasStaticColorScheme ? hardCodedHigh :
+                (isMgdL ? state.highGlucose : state.highGlucose.asMmolL),
             lowGlucoseColorValue: !hasStaticColorScheme ? hardCodedLow : (isMgdL ? state.lowGlucose : state.lowGlucose.asMmolL),
             lowGlucoseColorValue: !hasStaticColorScheme ? hardCodedLow : (isMgdL ? state.lowGlucose : state.lowGlucose.asMmolL),
             targetGlucose: isMgdL ? state.target : state.target.asMmolL,
             targetGlucose: isMgdL ? state.target : state.target.asMmolL,
             glucoseColorScheme: state.glucoseColorScheme
             glucoseColorScheme: state.glucoseColorScheme
@@ -33,7 +34,7 @@ struct LiveActivityView: View {
     var body: some View {
     var body: some View {
         if isWatchOS, context.state.useDetailedViewWatchOS {
         if isWatchOS, context.state.useDetailedViewWatchOS {
             VStack {
             VStack {
-                LiveActivityBGLabelWatchView(context: context, glucoseColor: .primary)
+                LiveActivityBGLabelWatchView(context: context, glucoseColor: glucoseColor)
                 LiveActivityChartView(context: context, additionalState: context.state.detailedViewState)
                 LiveActivityChartView(context: context, additionalState: context.state.detailedViewState)
                     .frame(maxWidth: UIScreen.main.bounds.width * 0.9)
                     .frame(maxWidth: UIScreen.main.bounds.width * 0.9)
             }
             }

+ 2 - 4
LiveActivity/Views/WidgetItems/LiveActivityBGLabelWatchView.swift

@@ -15,17 +15,16 @@ struct LiveActivityBGLabelWatchView: View {
     var body: some View {
     var body: some View {
         HStack {
         HStack {
             Text(context.state.bg)
             Text(context.state.bg)
-                .fontWeight(.bold)
                 .font(.callout)
                 .font(.callout)
                 .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                 .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
 
 
             if let trendArrow = context.state.direction {
             if let trendArrow = context.state.direction {
                 Text(trendArrow)
                 Text(trendArrow)
-                    .fontWeight(.bold)
                     .font(.callout)
                     .font(.callout)
                     .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                     .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                     .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
                     .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
+                    .padding(.leading, -5)
             }
             }
 
 
             Text(context.state.change)
             Text(context.state.change)
@@ -37,8 +36,7 @@ struct LiveActivityBGLabelWatchView: View {
 
 
             Text("\((context.state.date != nil) ? dateFormatter.string(from: context.state.date!) : "--")")
             Text("\((context.state.date != nil) ? dateFormatter.string(from: context.state.date!) : "--")")
                 .font(.callout)
                 .font(.callout)
-                .bold()
-                .foregroundStyle(context.isStale ? .red.opacity(0.6) : .secondary)
+                .foregroundStyle(context.isStale ? .red.opacity(0.6) : .primary)
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
         }
         }
     }
     }