فهرست منبع

Some fixes after the massive merge of doom from dev

dnzxy 2 سال پیش
والد
کامیت
3d2ba54a91
2فایلهای تغییر یافته به همراه22 افزوده شده و 2 حذف شده
  1. 1 0
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift
  2. 21 2
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

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

@@ -187,6 +187,7 @@ struct MainChartView: View {
                         basalView(fullSize: fullSize).drawingGroup()
                         basalView(fullSize: fullSize).drawingGroup()
                         Text(calculateTINS())
                         Text(calculateTINS())
                             .font(.callout).fontWeight(.bold)
                             .font(.callout).fontWeight(.bold)
+                            .offset(x: 0, y: 0)
                     }
                     }
 
 
                     mainView(fullSize: fullSize).id(Config.endID)
                     mainView(fullSize: fullSize).id(Config.endID)

+ 21 - 2
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -433,9 +433,28 @@ extension Home {
                         try? moc.save()
                         try? moc.save()
                         state.hours = button.hours
                         state.hours = button.hours
                     }
                     }
-                    .foregroundStyle(button.active ? .primary : .secondary)
+                    .foregroundStyle(button.active ? (colorScheme == .dark ? Color.white : Color.black).opacity(0.9) : .secondary)
                     .frame(maxHeight: 30).padding(.horizontal, 8)
                     .frame(maxHeight: 30).padding(.horizontal, 8)
-                    .background(button.active ? Color(.systemGray5) : .clear, in: .capsule(style: .circular))
+                    .background(
+                        button.active ?
+                            // RGB(30, 60, 95)
+                            (
+                                colorScheme == .dark ? Color(red: 0.1176470588, green: 0.2352941176, blue: 0.3725490196) :
+                                    Color.white
+                            ) :
+                            Color
+                            .clear
+                    )
+                    .shadow(
+                        color: colorScheme == .dark ? Color(
+                            red: 0.02745098039,
+                            green: 0.1098039216,
+                            blue: 0.1411764706
+                        ) : Color
+                            .black.opacity(0.33),
+                        radius: 3
+                    )
+                    .cornerRadius(20)
                 }
                 }
             }
             }
             .font(buttonFont)
             .font(buttonFont)