Explorar o código

conditionally colour popover glucose

polscm32 %!s(int64=2) %!d(string=hai) anos
pai
achega
8e1c0d6fb5

+ 4 - 0
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -265,6 +265,10 @@ extension MainChartView {
                 HStack {
                     Text(glucoseToShow.formatted(.number.precision(units == .mmolL ? .fractionLength(1) : .fractionLength(0))))
                         .fontWeight(.bold)
+                        .foregroundStyle(
+                            Decimal(sgv) < lowGlucose ? Color
+                                .red : (Decimal(sgv) > highGlucose ? Color.orange : Color.primary)
+                        )
                     Text(units.rawValue).foregroundColor(.secondary)
                 }
             }