Просмотр исходного кода

Basal insulin is now portrayed as icicles

Jon Mårtensson 5 лет назад
Родитель
Сommit
3f430e87e1
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

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

@@ -20,7 +20,7 @@ struct MainChartView: View {
     private enum Config {
         static let endID = "End"
         static let screenHours = 5
-        static let basalHeight: CGFloat = 60
+        static let basalHeight: CGFloat = 120
         static let topYPadding: CGFloat = 20
         static let bottomYPadding: CGFloat = 50
         static let minAdditionalWidth: CGFloat = 150
@@ -159,9 +159,10 @@ struct MainChartView: View {
 
     private func basalView(fullSize: CGSize) -> some View {
         ZStack {
-            tempBasalPath.fill(Color.tempBasal)
-            tempBasalPath.stroke(Color.tempBasal, lineWidth: 1)
-            regularBasalPath.stroke(Color.basal, lineWidth: 1)
+            tempBasalPath.fill(Color.tempBasal.opacity(0.5)).scaleEffect(x: 1, y: -1)
+            tempBasalPath.stroke(Color.tempBasal, lineWidth: 1).scaleEffect(x: 1, y: -1)
+            regularBasalPath.stroke(Color.tempBasal, style: StrokeStyle(lineWidth: 1, dash: [3])).scaleEffect(x: 1, y: -1)
+//           regularBasalPath.stroke(style: StrokeStyle(lineWidth: 1, dash: [3]))
         }
         .frame(width: fullGlucoseWidth(viewWidth: fullSize.width) + additionalWidth(viewWidth: fullSize.width))
         .frame(maxHeight: Config.basalHeight)