Skip to content

Commit

Permalink
Merge pull request #71 from amanbind007/main
Browse files Browse the repository at this point in the history
fix: font size resizing is capped between 12 to 40
  • Loading branch information
gavinhenderson authored Jul 8, 2024
2 parents 457ab9b + 42a206f commit ed49491
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions TextAloud/View/Settings/SettingViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,5 @@ extension SettingViewModel{
return temp
}

func incrementStep() {
fontSize += 1
}

func decrementStep() {
fontSize -= 1
}
}

6 changes: 1 addition & 5 deletions TextAloud/View/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,12 @@ extension SettingsView{

Divider().padding(.vertical, 4)

Stepper {
Stepper(value: $settingVM.fontSize, in: 12 ... 40) {
HStack {
Text(Localization.fontSize.toString)
Spacer()
Text("\(settingVM.fontSize)")
}
} onIncrement: {
settingVM.incrementStep()
} onDecrement: {
settingVM.decrementStep()
}
}
.font(.headline.weight(.medium))
Expand Down

0 comments on commit ed49491

Please sign in to comment.