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

adjust chart width to make y axis more readable

polscm32 aka Marvout 1 год назад
Родитель
Сommit
daa8f4913a

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

@@ -189,7 +189,7 @@ extension MainChartView {
         }
         .id("DummyMainChart")
         .frame(minHeight: UIScreen.main.bounds.height * 0.2)
-        .frame(width: screenSize.width)
+        .frame(width: screenSize.width - 10)
         .chartYAxis { mainChartYAxis }
         .chartXAxis(.hidden)
         .chartYScale(domain: minValue ... maxValue)
@@ -232,7 +232,7 @@ extension MainChartView {
                 calculateTTs()
             }
             .frame(minHeight: UIScreen.main.bounds.height * 0.2)
-            .frame(width: fullWidth(viewWidth: screenSize.width))
+            .frame(width: fullWidth(viewWidth: screenSize.width - 10))
             .chartXScale(domain: startMarker ... endMarker)
             .chartXAxis { mainChartXAxis }
             .chartYAxis(.hidden)
@@ -296,7 +296,7 @@ extension MainChartView {
                 calculateBasals()
             }
             .frame(height: UIScreen.main.bounds.height * 0.08)
-            .frame(width: fullWidth(viewWidth: screenSize.width))
+            .frame(width: fullWidth(viewWidth: screenSize.width - 10))
             .chartXScale(domain: startMarker ... endMarker)
             .chartXAxis { basalChartXAxis }
             .chartYAxis { basalChartYAxis }

+ 0 - 3
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -718,9 +718,6 @@ extension Home {
         @ViewBuilder func mainView() -> some View {
             GeometryReader { geo in
                 VStack(spacing: 0) {
-//                    Spacer()
-//                        .frame(height: UIScreen.main.bounds.height / 40)
-
                     ZStack {
                         /// glucose bobble
                         glucoseView