Browse Source

UI

* refactoring, nav bar titles in large
* change plus.circle.fill to plus in history view, display sheet title .inline
* change 'grams' to 'g' in add carbs view
polscm32 2 năm trước cách đây
mục cha
commit
e6c90d5902
24 tập tin đã thay đổi với 64 bổ sung64 xóa
  1. 1 1
      Dependencies/LoopKit/LoopKitUI/Views/Settings Editors/InsulinModelSelection.swift
  2. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/BeepPreferenceSelectionView.swift
  3. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/LowReservoirReminderEditView.swift
  4. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/PlayTestBeepsView.swift
  5. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/PumpManagerDetailsView.swift
  6. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/ReadPodInfoView.swift
  7. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/ReadPodStatusView.swift
  8. 1 1
      Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/SilencePodSelectionView.swift
  9. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/BeepPreferenceSelectionView.swift
  10. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/LowReservoirReminderEditView.swift
  11. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/PlayTestBeepsView.swift
  12. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/PumpManagerDetailsView.swift
  13. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/ReadPodInfoView.swift
  14. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/ReadPodStatusView.swift
  15. 1 1
      Dependencies/OmniKit/OmniKitUI/Views/SilencePodSelectionView.swift
  16. 6 6
      FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift
  17. 7 7
      FreeAPS/Sources/Modules/AddTempTarget/View/AddTempTargetRootView.swift
  18. 5 5
      FreeAPS/Sources/Modules/Bolus/View/AlternativeBolusCalcRootView.swift
  19. 5 5
      FreeAPS/Sources/Modules/Bolus/View/DefaultBolusCalcRootView.swift
  20. 1 1
      FreeAPS/Sources/Modules/ConfigEditor/View/ConfigEditorRootView.swift
  21. 11 11
      FreeAPS/Sources/Modules/DataTable/View/DataTableRootView.swift
  22. 3 3
      FreeAPS/Sources/Modules/OverrideProfilesConfig/View/OverrideProfilesRootView.swift
  23. 10 10
      FreeAPS/Sources/Modules/Settings/View/SettingsRootView.swift
  24. 1 1
      FreeAPS/Sources/Modules/Stat/View/StatRootView.swift

+ 1 - 1
Dependencies/LoopKit/LoopKitUI/Views/Settings Editors/InsulinModelSelection.swift

@@ -84,7 +84,7 @@ public struct InsulinModelSelection: View {
             content
             content
         case .settings:
         case .settings:
             contentWithCancel
             contentWithCancel
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
         }
         }
     }
     }
     
     

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/BeepPreferenceSelectionView.swift

@@ -88,7 +88,7 @@ struct BeepPreferenceSelectionView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(LocalizedString("Confidence Reminders", comment: "navigation title for confidence reminders"))
         .navigationTitle(LocalizedString("Confidence Reminders", comment: "navigation title for confidence reminders"))
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/LowReservoirReminderEditView.swift

@@ -75,7 +75,7 @@ struct LowReservoirReminderEditView: View {
             .disabled(saving || !valueChanged)
             .disabled(saving || !valueChanged)
         }
         }
         .navigationTitle("")
         .navigationTitle("")
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/PlayTestBeepsView.swift

@@ -49,7 +49,7 @@ struct PlayTestBeepsView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/PumpManagerDetailsView.swift

@@ -66,7 +66,7 @@ struct PumpManagerDetailsView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()
         }
         }

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/ReadPodInfoView.swift

@@ -63,7 +63,7 @@ struct ReadPodInfoView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/ReadPodStatusView.swift

@@ -59,7 +59,7 @@ struct ReadPodStatusView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniBLE/OmniBLE/PumpManagerUI/Views/SilencePodSelectionView.swift

@@ -86,7 +86,7 @@ struct SilencePodSelectionView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(LocalizedString("Silence Pod", comment: "navigation title for Silnce Pod"))
         .navigationTitle(LocalizedString("Silence Pod", comment: "navigation title for Silnce Pod"))
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/BeepPreferenceSelectionView.swift

@@ -89,7 +89,7 @@ struct BeepPreferenceSelectionView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(LocalizedString("Confidence Reminders", comment: "navigation title for confidence reminders"))
         .navigationTitle(LocalizedString("Confidence Reminders", comment: "navigation title for confidence reminders"))
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/LowReservoirReminderEditView.swift

@@ -76,7 +76,7 @@ struct LowReservoirReminderEditView: View {
             .disabled(saving || !valueChanged)
             .disabled(saving || !valueChanged)
         }
         }
         .navigationTitle("")
         .navigationTitle("")
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/PlayTestBeepsView.swift

@@ -49,7 +49,7 @@ struct PlayTestBeepsView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/PumpManagerDetailsView.swift

@@ -66,7 +66,7 @@ struct PumpManagerDetailsView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()
         }
         }

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/ReadPodInfoView.swift

@@ -64,7 +64,7 @@ struct ReadPodInfoView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/ReadPodStatusView.swift

@@ -60,7 +60,7 @@ struct ReadPodStatusView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(title)
         .navigationTitle(title)
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .onFirstAppear {
         .onFirstAppear {
             asyncAction()
             asyncAction()

+ 1 - 1
Dependencies/OmniKit/OmniKitUI/Views/SilencePodSelectionView.swift

@@ -87,7 +87,7 @@ struct SilencePodSelectionView: View {
         }
         }
         .insetGroupedListStyle()
         .insetGroupedListStyle()
         .navigationTitle(LocalizedString("Silence Pod", comment: "navigation title for Silnce Pod"))
         .navigationTitle(LocalizedString("Silence Pod", comment: "navigation title for Silnce Pod"))
-        .navigationBarTitleDisplayMode(.inline)
+         .navigationBarTitleDisplayMode(.large)
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
         .alert(isPresented: $alertIsPresented, content: { alert(error: error) })
     }
     }
 
 

+ 6 - 6
FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift

@@ -69,7 +69,7 @@ extension AddCarbs {
                             autofocus: true,
                             autofocus: true,
                             cleanInput: true
                             cleanInput: true
                         )
                         )
-                        Text("grams").foregroundColor(.secondary)
+                        Text("g").foregroundColor(.secondary)
                     }
                     }
 
 
                     if state.useFPUconversion {
                     if state.useFPUconversion {
@@ -128,7 +128,7 @@ extension AddCarbs {
                     .popover(isPresented: $isPromptPresented) {
                     .popover(isPresented: $isPromptPresented) {
                         presetPopover
                         presetPopover
                     }
                     }
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Button { state.add(override, fetch: editMode) }
                     Button { state.add(override, fetch: editMode) }
@@ -140,7 +140,7 @@ extension AddCarbs {
 
 
                 Section {
                 Section {
                     mealPresets
                     mealPresets
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
             }.scrollContentBackground(.hidden).background(color)
             }.scrollContentBackground(.hidden).background(color)
                 .onAppear {
                 .onAppear {
                     configureView {
                     configureView {
@@ -148,7 +148,7 @@ extension AddCarbs {
                     }
                     }
                 }
                 }
                 .navigationTitle("Add Meal")
                 .navigationTitle("Add Meal")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
         }
         }
 
 
         private var presetPopover: some View {
         private var presetPopover: some View {
@@ -313,7 +313,7 @@ extension AddCarbs {
                     autofocus: false,
                     autofocus: false,
                     cleanInput: true
                     cleanInput: true
                 )
                 )
-                Text("grams").foregroundColor(.secondary)
+                Text("g").foregroundColor(.secondary)
             }
             }
             HStack {
             HStack {
                 Text("Protein").foregroundColor(.red)
                 Text("Protein").foregroundColor(.red)
@@ -326,7 +326,7 @@ extension AddCarbs {
                     cleanInput: true
                     cleanInput: true
                 ).foregroundColor(.loopRed)
                 ).foregroundColor(.loopRed)
 
 
-                Text("grams").foregroundColor(.secondary)
+                Text("g").foregroundColor(.secondary)
             }
             }
         }
         }
     }
     }

+ 7 - 7
FreeAPS/Sources/Modules/AddTempTarget/View/AddTempTargetRootView.swift

@@ -49,7 +49,7 @@ extension AddTempTarget {
                         ForEach(state.presets) { preset in
                         ForEach(state.presets) { preset in
                             presetView(for: preset)
                             presetView(for: preset)
                         }
                         }
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 }
                 }
 
 
                 HStack {
                 HStack {
@@ -57,7 +57,7 @@ extension AddTempTarget {
                     Toggle(isOn: $state.viewPercantage) {}.controlSize(.mini)
                     Toggle(isOn: $state.viewPercantage) {}.controlSize(.mini)
                     Image(systemName: "figure.highintensity.intervaltraining")
                     Image(systemName: "figure.highintensity.intervaltraining")
                     Image(systemName: "fork.knife")
                     Image(systemName: "fork.knife")
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
 
 
                 if state.viewPercantage {
                 if state.viewPercantage {
                     Section {
                     Section {
@@ -98,7 +98,7 @@ extension AddTempTarget {
                                 ).accentColor(.green)
                                 ).accentColor(.green)
                             }
                             }
                         }
                         }
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 } else {
                 } else {
                     Section(header: Text("Custom")) {
                     Section(header: Text("Custom")) {
                         HStack {
                         HStack {
@@ -116,7 +116,7 @@ extension AddTempTarget {
                         DatePicker("Date", selection: $state.date)
                         DatePicker("Date", selection: $state.date)
                         Button { isPromptPresented = true }
                         Button { isPromptPresented = true }
                         label: { Text("Save as preset") }
                         label: { Text("Save as preset") }
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 }
                 }
                 if state.viewPercantage {
                 if state.viewPercantage {
                     Section {
                     Section {
@@ -130,7 +130,7 @@ extension AddTempTarget {
                         Button { isPromptPresented = true }
                         Button { isPromptPresented = true }
                         label: { Text("Save as preset") }
                         label: { Text("Save as preset") }
                             .disabled(state.duration == 0)
                             .disabled(state.duration == 0)
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 }
                 }
 
 
                 Section {
                 Section {
@@ -138,7 +138,7 @@ extension AddTempTarget {
                     label: { Text("Enact") }
                     label: { Text("Enact") }
                     Button { state.cancel() }
                     Button { state.cancel() }
                     label: { Text("Cancel Temp Target") }
                     label: { Text("Cancel Temp Target") }
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
             }.scrollContentBackground(.hidden).background(color)
             }.scrollContentBackground(.hidden).background(color)
                 .popover(isPresented: $isPromptPresented) {
                 .popover(isPresented: $isPromptPresented) {
                     Form {
                     Form {
@@ -159,7 +159,7 @@ extension AddTempTarget {
                     state.hbt = isEnabledArray.first?.hbt ?? 160
                     state.hbt = isEnabledArray.first?.hbt ?? 160
                 }
                 }
                 .navigationTitle("Enact Temp Target")
                 .navigationTitle("Enact Temp Target")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .navigationBarLeading) {
                     ToolbarItem(placement: .navigationBarLeading) {
                         Button("Close") {
                         Button("Close") {

+ 5 - 5
FreeAPS/Sources/Modules/Bolus/View/AlternativeBolusCalcRootView.swift

@@ -82,12 +82,12 @@ extension Bolus {
                     } else {
                     } else {
                         predictionChart
                         predictionChart
                     }
                     }
-                } header: { Text("Predictions") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Predictions") }.listRowBackground(Color.chart)
 
 
                 if fetch {
                 if fetch {
                     Section {
                     Section {
                         mealEntries
                         mealEntries
-                    } header: { Text("Meal Summary") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    } header: { Text("Meal Summary") }.listRowBackground(Color.chart)
                 }
                 }
 
 
                 Section {
                 Section {
@@ -173,7 +173,7 @@ extension Bolus {
                         }
                         }
                     }
                     }
 
 
-                } header: { Text("Bolus") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Bolus") }.listRowBackground(Color.chart)
 
 
                 if state.amount > 0 {
                 if state.amount > 0 {
                     Section {
                     Section {
@@ -196,12 +196,12 @@ extension Bolus {
                             appState.currentTab = .home
                             appState.currentTab = .home
                         }
                         }
                         label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
                         label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 }
                 }
             }.scrollContentBackground(.hidden).background(color)
             }.scrollContentBackground(.hidden).background(color)
                 .blur(radius: showInfo ? 3 : 0)
                 .blur(radius: showInfo ? 3 : 0)
                 .navigationTitle("Enact Bolus")
                 .navigationTitle("Enact Bolus")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarLeading) {
                     ToolbarItem(placement: .topBarLeading) {
                         if fetch {
                         if fetch {

+ 5 - 5
FreeAPS/Sources/Modules/Bolus/View/DefaultBolusCalcRootView.swift

@@ -61,12 +61,12 @@ extension Bolus {
                     } else {
                     } else {
                         predictionChart
                         predictionChart
                     }
                     }
-                } header: { Text("Predictions") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Predictions") }.listRowBackground(Color.chart)
 
 
                 if fetch {
                 if fetch {
                     Section {
                     Section {
                         mealEntries
                         mealEntries
-                    } header: { Text("Meal Summary") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    } header: { Text("Meal Summary") }.listRowBackground(Color.chart)
                 }
                 }
 
 
                 Section {
                 Section {
@@ -113,7 +113,7 @@ extension Bolus {
                         Text(!(state.amount > state.maxBolus) ? "U" : "😵").foregroundColor(.secondary)
                         Text(!(state.amount > state.maxBolus) ? "U" : "😵").foregroundColor(.secondary)
                     }
                     }
 
 
-                } header: { Text("Bolus") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Bolus") }.listRowBackground(Color.chart)
 
 
                 if state.amount > 0 {
                 if state.amount > 0 {
                     Section {
                     Section {
@@ -137,7 +137,7 @@ extension Bolus {
                             appState.currentTab = .home
                             appState.currentTab = .home
                         }
                         }
                         label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
                         label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
-                    }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                    }.listRowBackground(Color.chart)
                 }
                 }
             }.scrollContentBackground(.hidden).background(color)
             }.scrollContentBackground(.hidden).background(color)
                 .alert(isPresented: $displayError) {
                 .alert(isPresented: $displayError) {
@@ -169,7 +169,7 @@ extension Bolus {
                 }
                 }
 
 
                 .navigationTitle("Enact Bolus")
                 .navigationTitle("Enact Bolus")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarLeading) {
                     ToolbarItem(placement: .topBarLeading) {
                         if fetch {
                         if fetch {

+ 1 - 1
FreeAPS/Sources/Modules/ConfigEditor/View/ConfigEditorRootView.swift

@@ -55,7 +55,7 @@ extension ConfigEditor {
                         }
                         }
                     }
                     }
                     .navigationTitle(file)
                     .navigationTitle(file)
-                    .navigationBarTitleDisplayMode(.inline)
+                     .navigationBarTitleDisplayMode(.large)
                     .padding()
                     .padding()
             }
             }
             .scrollContentBackground(.hidden).background(color)
             .scrollContentBackground(.hidden).background(color)

+ 11 - 11
FreeAPS/Sources/Modules/DataTable/View/DataTableRootView.swift

@@ -104,7 +104,7 @@ extension DataTable {
             }.background(color)
             }.background(color)
                 .onAppear(perform: configureView)
                 .onAppear(perform: configureView)
                 .navigationTitle("History")
                 .navigationTitle("History")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarTrailing) {
                     ToolbarItem(placement: .topBarTrailing) {
                         switch state.mode {
                         switch state.mode {
@@ -133,8 +133,8 @@ extension DataTable {
             Button(
             Button(
                 action: action,
                 action: action,
                 label: {
                 label: {
-                    Image(systemName: "plus.circle.fill")
-                    Text("Add")
+                    Image(systemName: "plus")
+                        .font(.system(size: 20))
                 }
                 }
             )
             )
         }
         }
@@ -161,7 +161,7 @@ extension DataTable {
                         Text("No data.")
                         Text("No data.")
                     }
                     }
                 }
                 }
-            }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+            }.listRowBackground(Color.chart)
         }
         }
 
 
         private var mealsList: some View {
         private var mealsList: some View {
@@ -180,7 +180,7 @@ extension DataTable {
                         Text("No data.")
                         Text("No data.")
                     }
                     }
                 }
                 }
-            }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+            }.listRowBackground(Color.chart)
         }
         }
 
 
         private var glucoseList: some View {
         private var glucoseList: some View {
@@ -199,7 +199,7 @@ extension DataTable {
                         Text("No data.")
                         Text("No data.")
                     }
                     }
                 }
                 }
-            }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+            }.listRowBackground(Color.chart)
         }
         }
 
 
         @ViewBuilder private func addGlucoseView() -> some View {
         @ViewBuilder private func addGlucoseView() -> some View {
@@ -221,7 +221,7 @@ extension DataTable {
                                 )
                                 )
                                 Text(state.units.rawValue).foregroundStyle(.secondary)
                                 Text(state.units.rawValue).foregroundStyle(.secondary)
                             }
                             }
-                        }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                        }.listRowBackground(Color.chart)
 
 
                         Section {
                         Section {
                             HStack {
                             HStack {
@@ -244,7 +244,7 @@ extension DataTable {
                 }
                 }
                 .onAppear(perform: configureView)
                 .onAppear(perform: configureView)
                 .navigationTitle("Add Glucose")
                 .navigationTitle("Add Glucose")
-                .navigationBarTitleDisplayMode(.automatic)
+                .navigationBarTitleDisplayMode(.inline)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarLeading) {
                     ToolbarItem(placement: .topBarLeading) {
                         Button("Close") {
                         Button("Close") {
@@ -403,11 +403,11 @@ extension DataTable {
                                 )
                                 )
                                 Text("U").foregroundColor(.secondary)
                                 Text("U").foregroundColor(.secondary)
                             }
                             }
-                        }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                        }.listRowBackground(Color.chart)
 
 
                         Section {
                         Section {
                             DatePicker("Date", selection: $state.externalInsulinDate, in: ...Date())
                             DatePicker("Date", selection: $state.externalInsulinDate, in: ...Date())
-                        }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                        }.listRowBackground(Color.chart)
 
 
                         let amountWarningCondition = (state.externalInsulinAmount > state.maxBolus)
                         let amountWarningCondition = (state.externalInsulinAmount > state.maxBolus)
 
 
@@ -459,7 +459,7 @@ extension DataTable {
                 }
                 }
                 .onAppear(perform: configureView)
                 .onAppear(perform: configureView)
                 .navigationTitle("External Insulin")
                 .navigationTitle("External Insulin")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.inline)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarLeading) {
                     ToolbarItem(placement: .topBarLeading) {
                         Button("Close") {
                         Button("Close") {

+ 3 - 3
FreeAPS/Sources/Modules/OverrideProfilesConfig/View/OverrideProfilesRootView.swift

@@ -273,12 +273,12 @@ extension OverrideProfilesConfig {
                     Text(
                     Text(
                         "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage."
                         "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage."
                     )
                     )
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
 
 
                 Button("Return to Normal") {
                 Button("Return to Normal") {
                     state.cancelProfile()
                     state.cancelProfile()
                     dismiss()
                     dismiss()
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
                     .frame(maxWidth: .infinity, alignment: .center)
                     .frame(maxWidth: .infinity, alignment: .center)
                     .buttonStyle(BorderlessButtonStyle())
                     .buttonStyle(BorderlessButtonStyle())
                     .disabled(!state.isEnabled)
                     .disabled(!state.isEnabled)
@@ -287,7 +287,7 @@ extension OverrideProfilesConfig {
                 .onAppear(perform: configureView)
                 .onAppear(perform: configureView)
                 .onAppear { state.savedSettings() }
                 .onAppear { state.savedSettings() }
                 .navigationBarTitle("Profiles")
                 .navigationBarTitle("Profiles")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
         }
         }
 
 
         @ViewBuilder private func profilesView(for preset: OverridePresets) -> some View {
         @ViewBuilder private func profilesView(for preset: OverridePresets) -> some View {

+ 10 - 10
FreeAPS/Sources/Modules/Settings/View/SettingsRootView.swift

@@ -35,13 +35,13 @@ extension Settings {
                     Text(
                     Text(
                         "iAPS v\(state.versionNumber) (\(state.buildNumber))\nBranch: \(state.branch) \(state.copyrightNotice) "
                         "iAPS v\(state.versionNumber) (\(state.buildNumber))\nBranch: \(state.branch) \(state.copyrightNotice) "
                     ).textCase(nil)
                     ).textCase(nil)
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("Pump").navigationLink(to: .pumpConfig, from: self)
                     Text("Pump").navigationLink(to: .pumpConfig, from: self)
                     Text("CGM").navigationLink(to: .cgm, from: self)
                     Text("CGM").navigationLink(to: .cgm, from: self)
                     Text("Watch").navigationLink(to: .watch, from: self)
                     Text("Watch").navigationLink(to: .watch, from: self)
-                } header: { Text("Devices") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Devices") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("Nightscout").navigationLink(to: .nighscoutConfig, from: self)
                     Text("Nightscout").navigationLink(to: .nighscoutConfig, from: self)
@@ -49,7 +49,7 @@ extension Settings {
                         Text("Apple Health").navigationLink(to: .healthkit, from: self)
                         Text("Apple Health").navigationLink(to: .healthkit, from: self)
                     }
                     }
                     Text("Notifications").navigationLink(to: .notificationsConfig, from: self)
                     Text("Notifications").navigationLink(to: .notificationsConfig, from: self)
-                } header: { Text("Services") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Services") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("Pump Settings").navigationLink(to: .pumpSettingsEditor, from: self)
                     Text("Pump Settings").navigationLink(to: .pumpSettingsEditor, from: self)
@@ -57,12 +57,12 @@ extension Settings {
                     Text("Insulin Sensitivities").navigationLink(to: .isfEditor, from: self)
                     Text("Insulin Sensitivities").navigationLink(to: .isfEditor, from: self)
                     Text("Carb Ratios").navigationLink(to: .crEditor, from: self)
                     Text("Carb Ratios").navigationLink(to: .crEditor, from: self)
                     Text("Target Glucose").navigationLink(to: .targetsEditor, from: self)
                     Text("Target Glucose").navigationLink(to: .targetsEditor, from: self)
-                } header: { Text("Configuration") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Configuration") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("OpenAPS").navigationLink(to: .preferencesEditor, from: self)
                     Text("OpenAPS").navigationLink(to: .preferencesEditor, from: self)
                     Text("Autotune").navigationLink(to: .autotuneConfig, from: self)
                     Text("Autotune").navigationLink(to: .autotuneConfig, from: self)
-                } header: { Text("OpenAPS") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("OpenAPS") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("UI/UX").navigationLink(to: .statisticsConfig, from: self)
                     Text("UI/UX").navigationLink(to: .statisticsConfig, from: self)
@@ -70,7 +70,7 @@ extension Settings {
                     Text("Bolus Calculator").navigationLink(to: .bolusCalculatorConfig, from: self)
                     Text("Bolus Calculator").navigationLink(to: .bolusCalculatorConfig, from: self)
                     Text("Fat And Protein Conversion").navigationLink(to: .fpuConfig, from: self)
                     Text("Fat And Protein Conversion").navigationLink(to: .fpuConfig, from: self)
                     Text("Dynamic ISF").navigationLink(to: .dynamicISF, from: self)
                     Text("Dynamic ISF").navigationLink(to: .dynamicISF, from: self)
-                } header: { Text("Extra Features") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Extra Features") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Toggle("Debug options", isOn: $state.debugOptions)
                     Toggle("Debug options", isOn: $state.debugOptions)
@@ -134,18 +134,18 @@ extension Settings {
                                 .navigationLink(to: .configEditor(file: OpenAPS.FreeAPS.settings), from: self)
                                 .navigationLink(to: .configEditor(file: OpenAPS.FreeAPS.settings), from: self)
                         }
                         }
                     }
                     }
-                } header: { Text("Developer") }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                } header: { Text("Developer") }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Toggle("Animated Background", isOn: $state.animatedBackground)
                     Toggle("Animated Background", isOn: $state.animatedBackground)
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
 
 
                 Section {
                 Section {
                     Text("Share logs")
                     Text("Share logs")
                         .onTapGesture {
                         .onTapGesture {
                             showShareSheet = true
                             showShareSheet = true
                         }
                         }
-                }.listRowBackground(colorScheme == .dark ? Color.chart : Color.white)
+                }.listRowBackground(Color.chart)
             }.scrollContentBackground(.hidden).background(color)
             }.scrollContentBackground(.hidden).background(color)
                 .sheet(isPresented: $showShareSheet) {
                 .sheet(isPresented: $showShareSheet) {
                     ShareSheet(activityItems: state.logItems())
                     ShareSheet(activityItems: state.logItems())
@@ -159,7 +159,7 @@ extension Settings {
                         }
                         }
                     }
                     }
                 }
                 }
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .onDisappear(perform: { state.uploadProfileAndSettings(false) })
                 .onDisappear(perform: { state.uploadProfileAndSettings(false) })
         }
         }
     }
     }

+ 1 - 1
FreeAPS/Sources/Modules/Stat/View/StatRootView.swift

@@ -167,7 +167,7 @@ extension Stat {
             }.background(color)
             }.background(color)
                 .onAppear(perform: configureView)
                 .onAppear(perform: configureView)
                 .navigationBarTitle("Statistics")
                 .navigationBarTitle("Statistics")
-                .navigationBarTitleDisplayMode(.inline)
+                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
                 .toolbar {
                     ToolbarItem(placement: .topBarLeading) {
                     ToolbarItem(placement: .topBarLeading) {
                         Button("Close") {
                         Button("Close") {