Skip to content

Commit

Permalink
Change slider numbering position and add spacing nightscout#291 (nigh…
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzxy authored Nov 10, 2023
1 parent 466ad8c commit a7f2857
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ extension OverrideProfilesConfig {
}
Section {
VStack {
Spacer()
Text("\(state.percentage.formatted(.number)) %")
.foregroundColor(
state
.percentage >= 130 ? .red :
(isEditing ? .orange : .blue)
)
.font(.largeTitle)
Slider(
value: $state.percentage,
in: 10 ... 200,
Expand All @@ -80,13 +88,6 @@ extension OverrideProfilesConfig {
isEditing = editing
}
).accentColor(state.percentage >= 130 ? .red : .blue)
Text("\(state.percentage.formatted(.number)) %")
.foregroundColor(
state
.percentage >= 130 ? .red :
(isEditing ? .orange : .blue)
)
.font(.largeTitle)
Spacer()
Toggle(isOn: $state._indefinite) {
Text("Enable indefinitely")
Expand Down

0 comments on commit a7f2857

Please sign in to comment.