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

resizing of home screen elements

polscm32 2 лет назад
Родитель
Сommit
7a5b9430d7

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

@@ -362,9 +362,9 @@ extension MainChartView {
                     calculatePredictions()
                 }
                 .frame(
-                    minHeight: UIScreen.main.bounds.height / 5
+                    minHeight: UIScreen.main.bounds.height * 0.25
                 )
-                .frame(maxHeight: UIScreen.main.bounds.height / 3.5)
+                .frame(maxHeight: UIScreen.main.bounds.height * 0.35)
                 .frame(width: fullWidth(viewWidth: screenSize.width))
                 // .chartYScale(domain: minValue ... maxValue)
                 .chartXScale(domain: startMarker ... endMarker)
@@ -507,9 +507,9 @@ extension MainChartView {
                 calculateTempBasals()
             }
             .frame(
-                minHeight: UIScreen.main.bounds.height / 15
+                minHeight: UIScreen.main.bounds.height * 0.05
             )
-            .frame(maxHeight: UIScreen.main.bounds.height / 12)
+            .frame(maxHeight: UIScreen.main.bounds.height * 0.08)
             .frame(width: fullWidth(viewWidth: screenSize.width))
             .rotationEffect(.degrees(180))
             .scaleEffect(x: -1, y: 1)

+ 4 - 4
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -708,8 +708,8 @@ extension Home {
         @ViewBuilder func mainView() -> some View {
             GeometryReader { geo in
                 VStack(spacing: 0) {
-                    Spacer()
-                        .frame(height: UIScreen.main.bounds.height / 16)
+//                    Spacer()
+//                        .frame(height: UIScreen.main.bounds.height / 40)
 
                     ZStack {
                         /// glucose bobble
@@ -740,8 +740,8 @@ extension Home {
                             radius: 3
                         )
                         .padding(.horizontal, 10)
-                        .frame(maxHeight: UIScreen.main.bounds.height / 2.4)
-                        .frame(minHeight: UIScreen.main.bounds.height / 3)
+                        .frame(maxHeight: UIScreen.main.bounds.height * 0.45)
+                        .frame(minHeight: UIScreen.main.bounds.height * 0.4)
 
                     timeInterval.padding(.top, 20).padding(.bottom, 20)