bastiaanv преди 6 месеца
родител
ревизия
32d854b71e

+ 4 - 1
LiveActivity/Views/LiveActivityGlucoseDeltaLabelView.swift

@@ -15,7 +15,10 @@ struct LiveActivityGlucoseDeltaLabelView: View {
     var body: some View {
         if !context.state.change.isEmpty {
             Text(context.state.change)
-                .foregroundStyle(context.state.glucoseColorScheme == "staticColor" ? .primary : glucoseColor)
+                .foregroundStyle(
+                    context.isStale ? .secondary : context.state
+                        .glucoseColorScheme == "staticColor" ? .primary : glucoseColor
+                )
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
         } else {
             Text("--")

+ 7 - 12
LiveActivity/Views/WidgetItems/LiveActivityBGLabelLargeView.swift

@@ -10,23 +10,18 @@ struct LiveActivityBGLabelLargeView: View {
 
     var body: some View {
         HStack(alignment: .center) {
-            if let trendArrow = context.state.direction {
-                Text(context.state.bg)
-                    .fontWeight(.bold)
-                    .font(!isWatchOS ? .title : .title3)
-                    .foregroundStyle(context.isStale ? .secondary : glucoseColor)
-                    .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
+            Text(context.state.bg)
+                .fontWeight(.bold)
+                .font(!isWatchOS ? .title : .title3)
+                .foregroundStyle(context.isStale ? .secondary : glucoseColor)
+                .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
 
+            if let trendArrow = context.state.direction {
                 Text(trendArrow)
                     .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                     .fontWeight(.bold)
                     .font(!isWatchOS ? .headline : .subheadline)
-            } else {
-                Text(context.state.bg)
-                    .fontWeight(.bold)
-                    .font(!isWatchOS ? .title : .title3)
-                    .foregroundStyle(context.isStale ? .secondary : glucoseColor)
-                    .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
+                    .padding(.leading, !isWatchOS ? 0 : -5)
             }
         }
     }

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

@@ -15,23 +15,22 @@ struct LiveActivityBGLabelWatchView: View {
     var body: some View {
         HStack {
             Text(context.state.bg)
-                .bold()
                 .font(.callout)
+                .fontWeight(.bold)
                 .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
 
             if let trendArrow = context.state.direction {
                 Text(trendArrow)
-                    .bold()
                     .font(.callout)
+                    .fontWeight(.bold)
                     .foregroundStyle(context.isStale ? .secondary : glucoseColor)
-                    .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
                     .padding(.leading, -5)
             }
 
             Text(context.state.change)
                 .font(.callout)
-                .foregroundStyle(.primary)
+                .foregroundStyle(context.isStale ? .secondary : glucoseColor)
                 .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
 
             Spacer()