Przeglądaj źródła

merge fixes, apply opacity to suspension rectangle

polscm32 2 lat temu
rodzic
commit
abde52c0f8

+ 6 - 8
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -374,9 +374,8 @@ extension MainChartView {
                 ) { _ in
                 ) { _ in
                     calculatePredictions()
                     calculatePredictions()
                 }
                 }
-                .frame(
-                    minHeight: UIScreen.main.bounds.height / 3.6
-                )
+                .frame(minHeight: UIScreen.main.bounds.height * 0.25)
+                .frame(maxHeight: UIScreen.main.bounds.height * 0.35)
                 .frame(width: fullWidth(viewWidth: screenSize.width))
                 .frame(width: fullWidth(viewWidth: screenSize.width))
                 .chartXScale(domain: startMarker ... endMarker)
                 .chartXScale(domain: startMarker ... endMarker)
                 .chartXAxis {
                 .chartXAxis {
@@ -517,7 +516,7 @@ extension MainChartView {
                             yStart: .value("suspend-start", 0),
                             yStart: .value("suspend-start", 0),
                             yEnd: .value("suspend-end", suspensionMarkHeight)
                             yEnd: .value("suspend-end", suspensionMarkHeight)
                         )
                         )
-                        .foregroundStyle(Color.loopGray)
+                        .foregroundStyle(Color.loopGray.opacity(0.3))
                     }
                     }
                 }
                 }
             }.onChange(of: tempBasals) { _ in
             }.onChange(of: tempBasals) { _ in
@@ -538,9 +537,8 @@ extension MainChartView {
             }.onChange(of: basalProfile) { _ in
             }.onChange(of: basalProfile) { _ in
                 calculateTempBasals()
                 calculateTempBasals()
             }
             }
-            .frame(
-                minHeight: UIScreen.main.bounds.height / 9.8
-            )
+            .frame(minHeight: UIScreen.main.bounds.height * 0.05)
+            .frame(maxHeight: UIScreen.main.bounds.height * 0.08)
             .frame(width: fullWidth(viewWidth: screenSize.width))
             .frame(width: fullWidth(viewWidth: screenSize.width))
             .rotationEffect(.degrees(180))
             .rotationEffect(.degrees(180))
             .scaleEffect(x: -1, y: 1)
             .scaleEffect(x: -1, y: 1)
@@ -925,4 +923,4 @@ extension MainChartView {
         }
         }
         BasalProfiles = basals
         BasalProfiles = basals
     }
     }
-}
+}