Skip to content

Commit 32abb90

Browse files
authored
Fix Display Zoom issue in Reader (#24895)
* Fix Display Zoom issue in Reader * Update release nots
1 parent b0b8c68 commit 32abb90

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [*] Fix a few minor visual issues on iOS 26 [#24863], [#24863], [#24865], [#24866], [#24867], [#24890]
44
* [*] [Intelligence] Add support for generating excerpts for posts [#24852]
55
* [*] Fix an issue with themes in Reader [#24881]
6+
* [*] Fix an issue with Reader article rendering when iOS "Display Zoom" is enabled [#24895]
67
* [*] Fix performance issues with search in Reader Subscriptions [#24841]
78
* [*] Improve performance and animations when showing a full Top List with a large number of items [#24868]
89
* [*] Show the Top 10 and 50 items in the Top List screen in a dedicated section [#24868]

WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailViewController.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,13 @@ class ReaderDetailViewController: UIViewController, ReaderDetailView {
468468

469469
/// Apply view styles
470470
@MainActor private func applyStyles() {
471-
webView.pinEdges(.horizontal, to: view, insets: UIEdgeInsets(.horizontal, 16), priority: .init(950))
471+
guard let readableGuide = webView.superview?.readableContentGuide else {
472+
return
473+
}
474+
472475
NSLayoutConstraint.activate([
473-
webView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
474-
webView.widthAnchor.constraint(lessThanOrEqualToConstant: UIFontMetrics(forTextStyle: .body).scaledValue(for: Constants.preferredArticleWidth))
476+
webView.rightAnchor.constraint(equalTo: readableGuide.rightAnchor, constant: -Constants.margin),
477+
webView.leftAnchor.constraint(equalTo: readableGuide.leftAnchor, constant: Constants.margin)
475478
])
476479

477480
webView.translatesAutoresizingMaskIntoConstraints = false
@@ -879,6 +882,7 @@ class ReaderDetailViewController: UIViewController, ReaderDetailView {
879882

880883
private enum Constants {
881884
static let preferredArticleWidth: CGFloat = 680
885+
static let margin: CGFloat = UIDevice.isPad() ? 0 : 8
882886
}
883887

884888
// MARK: - Managed object observer

0 commit comments

Comments
 (0)