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

Removed y=0 line, not needed when having icicles. Looks more clean now

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

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

@@ -164,7 +164,7 @@ struct MainChartView: View {
     private func basalView(fullSize: CGSize) -> some View {
         ZStack {
             tempBasalPath.fill(Color.tempBasal.opacity(0.5)).scaleEffect(x: 1, y: -1)
-            tempBasalPath.stroke(Color.tempBasal, lineWidth: 1).scaleEffect(x: 1, y: -1)
+//            tempBasalPath.stroke(Color.tempBasal, lineWidth: 1).scaleEffect(x: 1, y: -1)          // removed the Y=0 line, not needed when having icicles
             regularBasalPath.stroke(Color.tempBasal, style: StrokeStyle(lineWidth: 1, dash: [3])).scaleEffect(x: 1, y: -1)
         }
         .frame(width: fullGlucoseWidth(viewWidth: fullSize.width) + additionalWidth(viewWidth: fullSize.width))
@@ -223,8 +223,9 @@ struct MainChartView: View {
                 path.move(to: CGPoint(x: x, y: 0))
                 path.addLine(to: CGPoint(x: x, y: fullSize.height - 20))
             }
-            .stroke(colorScheme == .dark ? Color.white : Color.black,                             // current time as vertical line
-            style: StrokeStyle(lineWidth: 0.5, dash: [2])
+            .stroke(
+                colorScheme == .dark ? Color.white : Color.black, // current time as vertical line
+                style: StrokeStyle(lineWidth: 0.5, dash: [2])
             )
         }
     }