Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ public struct ReaderDisplaySettings: Codable, Equatable, Hashable, Sendable {
case normal
case large
case extraLarge
case extraExtraLarge
case extraExtraExtraLarge

public var scale: Double {
switch self {
Expand All @@ -262,6 +264,10 @@ public struct ReaderDisplaySettings: Codable, Equatable, Hashable, Sendable {
return 1.15
case .extraLarge:
return 1.25
case .extraExtraLarge:
return 1.4
case .extraExtraExtraLarge:
return 1.6
}
}

Expand Down Expand Up @@ -297,6 +303,18 @@ public struct ReaderDisplaySettings: Codable, Equatable, Hashable, Sendable {
value: "Extra Large",
comment: "Accessibility label for the Extra Large size option, used in the Reader's reading preferences."
)
case .extraExtraLarge:
return NSLocalizedString(
"reader.preferences.size.extraExtraLarge",
value: "Extra Extra Large",
comment: "Accessibility label for the Extra Extra Large size option, used in the Reader's reading preferences."
)
case .extraExtraExtraLarge:
return NSLocalizedString(
"reader.preferences.size.extraExtraExtraLarge",
value: "Extra Extra Extra Large",
comment: "Accessibility label for the Extra Extra Extra Large size option, used in the Reader's reading preferences."
)
}
}

Expand All @@ -312,6 +330,10 @@ public struct ReaderDisplaySettings: Codable, Equatable, Hashable, Sendable {
return "large"
case .extraLarge:
return "extra_large"
case .extraExtraLarge:
return "extra_extra_large"
case .extraExtraExtraLarge:
return "extra_extra_extra_large"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [*] Add "File Size" to Site Media Details [#24947]
* [*] Add "Email to Subscribers" row to "Publishing" sheet [#24946]
* [*] Add permalink preview in the slug editor and make other improvements [#24949]
* [*] Add two accessible font sizes to Reader display settings [#25013]
* [*] Add "Taxonomies" to Site Settings [#24955]
* [*] Update "Categories" picker to indicate multiple selection [#24952]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ extension ReaderDisplaySettingSelectionView {

var sizeSelectionView: some View {
Slider(value: $sliderValue,
in: Double(ReaderDisplaySettings.Size.extraSmall.rawValue)...Double(ReaderDisplaySettings.Size.extraLarge.rawValue),
in: Double(ReaderDisplaySettings.Size.extraSmall.rawValue)...Double(ReaderDisplaySettings.Size.extraExtraExtraLarge.rawValue),
step: 1) {
Text(Strings.sizeSliderLabel)
} minimumValueLabel: {
Expand All @@ -420,7 +420,7 @@ extension ReaderDisplaySettingSelectionView {
.accessibilityHidden(true)
} maximumValueLabel: {
Text("A")
.font(Font(ReaderDisplaySettings.font(with: .sans, size: .extraLarge, textStyle: .body)))
.font(Font(ReaderDisplaySettings.font(with: .sans, size: .extraExtraExtraLarge, textStyle: .body)))
.accessibilityHidden(true)
} onEditingChanged: { _ in
let size = ReaderDisplaySettings.Size(rawValue: Int(sliderValue)) ?? .normal
Expand Down