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

clean Garmin app config UI spacing

Adjusts padding and layout within the Garmin app configuration view to ensure consistent bottom spacing between sections. Updates content presentation by replacing vertical padding with bottom-specific padding and restructuring elements for improved visual arrangement.
Robert 1 месяц назад
Родитель
Сommit
332f293f84

+ 28 - 4
Trio/Sources/Modules/WatchConfig/View/WatchConfigGarminAppConfigView.swift

@@ -56,7 +56,9 @@ struct WatchConfigGarminAppConfigView: View {
                                 }
                             ).buttonStyle(BorderlessButtonStyle())
                         }.padding(.top)
-                        Spacer()
+                    }.padding(.bottom)
+
+                    VStack {
                         // Inverted binding: "Disable" toggle controls "isEnabled" boolean
                         // When toggle is ON → data transmission is DISABLED (isEnabled = false)
                         // When toggle is OFF → data transmission is ENABLED (isEnabled = true)
@@ -84,7 +86,7 @@ struct WatchConfigGarminAppConfigView: View {
                                 }
                             ).buttonStyle(BorderlessButtonStyle())
                         }.padding(.top)
-                    }.padding(.vertical)
+                    }.padding(.bottom)
                 }
             ).listRowBackground(Color.chart)
 
@@ -123,7 +125,7 @@ struct WatchConfigGarminAppConfigView: View {
                                 }
                             ).buttonStyle(BorderlessButtonStyle())
                         }.padding(.top)
-                    }.padding(.vertical)
+                    }.padding(.bottom)
                 }
             ).listRowBackground(Color.chart)
 
@@ -141,6 +143,28 @@ struct WatchConfigGarminAppConfigView: View {
                                 Text(selection.displayName).tag(selection)
                             }
                         }.padding(.top)
+                        HStack(alignment: .center) {
+                            Text(
+                                "Choose between displayed data types on Garmin device."
+                            )
+                            .font(.footnote)
+                            .foregroundColor(.secondary)
+                            .lineLimit(nil)
+                            Spacer()
+                            Button(
+                                action: {
+                                    shouldDisplayHint3.toggle()
+                                },
+                                label: {
+                                    HStack {
+                                        Image(systemName: "questionmark.circle")
+                                    }
+                                }
+                            ).buttonStyle(BorderlessButtonStyle())
+                        }.padding(.top)
+                    }.padding(.bottom)
+
+                    VStack {
                         Picker(
                             selection: $state.garminSettings.secondaryAttributeChoice,
                             label: Text("Data Choice 2").multilineTextAlignment(.leading)
@@ -168,7 +192,7 @@ struct WatchConfigGarminAppConfigView: View {
                                 }
                             ).buttonStyle(BorderlessButtonStyle())
                         }.padding(.top)
-                    }.padding(.vertical)
+                    }.padding(.bottom)
                 }
             ).listRowBackground(Color.chart)
         }