Browse Source

Add loop status ring to loop status glow WIP

Deniz Cengiz 1 year ago
parent
commit
e3d492e8db
1 changed files with 9 additions and 2 deletions
  1. 9 2
      Trio Watch App Extension/Views/GlucoseTrendView.swift

+ 9 - 2
Trio Watch App Extension/Views/GlucoseTrendView.swift

@@ -12,11 +12,18 @@ struct GlucoseTrendView: View {
     var body: some View {
         VStack {
             ZStack {
-                TrendShape(rotationDegrees: rotationDegrees, isSmallDevice: is40mm)
-                    .animation(.spring(response: 0.5, dampingFraction: 0.6), value: rotationDegrees)
+                Circle()
+                    // TODO: set loop colors conditionally, not hard coded
+                    .stroke(Color.green, lineWidth: is40mm ? 1 : 1.5)
+                    .frame(width: is40mm ? 86 : 105, height: is40mm ? 86 : 105)
+                    .background(Circle().fill(Color.bgDarkBlue))
                     // TODO: set loop colors conditionally, not hard coded
                     .shadow(color: .green, radius: is40mm ? 8 : 12)
 
+                TrendShape(rotationDegrees: rotationDegrees, isSmallDevice: is40mm)
+                    .animation(.spring(response: 0.5, dampingFraction: 0.6), value: rotationDegrees)
+                    .shadow(color: Color.black.opacity(0.5), radius: 5)
+
                 VStack(alignment: .center) {
                     Text(state.currentGlucose)
                         .fontWeight(.semibold)