polscm32 aka Marvout 1 год назад
Родитель
Сommit
6c87a52d03
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

+ 2 - 1
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -429,13 +429,14 @@ extension MainChartView {
             if let glucose = timeToNearestGlucose(time: carbDate.timeIntervalSince1970)?.glucose {
             if let glucose = timeToNearestGlucose(time: carbDate.timeIntervalSince1970)?.glucose {
                 let yPosition = (Decimal(glucose) * conversionFactor) - bolusOffset
                 let yPosition = (Decimal(glucose) * conversionFactor) - bolusOffset
                 let size = (Config.carbsSize + CGFloat(carbAmount) * Config.carbsScale)
                 let size = (Config.carbsSize + CGFloat(carbAmount) * Config.carbsScale)
+                let limitedSize = size > 30 ? 30 : size
 
 
                 PointMark(
                 PointMark(
                     x: .value("Time", carbDate, unit: .second),
                     x: .value("Time", carbDate, unit: .second),
                     y: .value("Value", yPosition)
                     y: .value("Value", yPosition)
                 )
                 )
                 .symbol {
                 .symbol {
-                    Image(systemName: "arrowtriangle.down.fill").font(.system(size: size)).foregroundStyle(Color.orange)
+                    Image(systemName: "arrowtriangle.down.fill").font(.system(size: limitedSize)).foregroundStyle(Color.orange)
                         .rotationEffect(.degrees(180))
                         .rotationEffect(.degrees(180))
                 }
                 }
                 .annotation(position: .bottom) {
                 .annotation(position: .bottom) {