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
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ open: **a second build under the same version goes under the already cut
heading, not back under `Unreleased`.** Date the heading and add its compare link
once the version tag exists.

## [Unreleased]

### Fixed

- The buttons above an open document no longer sit on the status bar, and the
empty band below them is gone.

## [1.39]

### Changed
Expand Down Expand Up @@ -147,7 +154,8 @@ submitted.
- An incorrect password is now reported as such instead of a generic failure.
- Page handling and decryption fixes when opening protected documents.

[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.38...HEAD
[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.39...HEAD
[1.39]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.38...v1.39
[1.38]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.37...v1.38
[1.37]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.36...v1.37
[1.36]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.35...v1.36
Expand Down
17 changes: 16 additions & 1 deletion OpenDocumentReader/DocumentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel
}
}

/// From iOS 26 the bar's buttons are glass capsules filling its whole
/// height, which whatever is pinned to its bottom edge would cut off. Older
/// bars have a background of their own and want no such gap.
private static var toolBarBottomMargin: CGFloat {
if #available(iOS 26.0, *) {
return 8
}

return 0
}

func setVCconstraints() {
searchBar.translatesAutoresizingMaskIntoConstraints = false
bannerSlot.translatesAutoresizingMaskIntoConstraints = false
Expand All @@ -197,14 +208,18 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel

searchBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
searchBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
searchBar.topAnchor.constraint(equalTo: toolBar.bottomAnchor).isActive = true
searchBar.topAnchor.constraint(equalTo: toolBar.bottomAnchor, constant: Self.toolBarBottomMargin).isActive =
true
Comment thread
andiwand marked this conversation as resolved.

bannerSlot.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
bannerSlot.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
bannerSlot.topAnchor.constraint(equalTo: searchBar.bottomAnchor).isActive = true
// no height here: that is bannerSlotHeight from the storyboard, which
// hideBannerSlot zeroes, and a second one would fight it

// below the banner, which is why the tab bar is not in the tool bar's
// stack: an arranged subview is placed by the stack, and these would be
// a second answer to the same question
pageTabBar.topAnchor.constraint(equalTo: bannerSlot.bottomAnchor).isActive = true
pageTabBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
pageTabBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
Expand Down
27 changes: 8 additions & 19 deletions OpenDocumentReader/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,11 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view hidden="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sKS-nk-f6M">
<rect key="frame" x="0.0" y="0.0" width="0.0" height="44"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" notEnabled="YES"/>
</accessibility>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="9mi-yf-jXf">
<rect key="frame" x="0.0" y="0.0" width="414" height="88"/>
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<subviews>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="N1x-QM-Qks">
<rect key="frame" x="0.0" y="0.0" width="414" height="88"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<items>
<barButtonItem title="Back to documents" id="yhO-7V-lbn">
<connections>
Expand All @@ -65,10 +58,6 @@
</barButtonItem>
</items>
</toolbar>
<view hidden="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sIx-zo-9kG" customClass="PageTabBar" customModule="OpenDocumentReader" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
</view>
<progressView hidden="YES" opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="ePk-bQ-fV8">
<rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
</progressView>
Expand All @@ -94,16 +83,16 @@
<constraint firstAttribute="height" constant="50" id="eXE-Ks-sQc"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sIx-zo-9kG" customClass="PageTabBar" customModule="OpenDocumentReader" customModuleProvider="target">
<rect key="frame" x="0.0" y="190" width="414" height="0.0"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="HAk-oU-gAF"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="9mi-yf-jXf" firstAttribute="leading" secondItem="HAk-oU-gAF" secondAttribute="leading" id="5Hh-GZ-aPw"/>
<constraint firstItem="sKS-nk-f6M" firstAttribute="top" secondItem="SIE-Uh-Zny" secondAttribute="top" id="HjQ-CN-3cF"/>
<constraint firstItem="N1x-QM-Qks" firstAttribute="top" secondItem="9mi-yf-jXf" secondAttribute="top" id="Yiq-pe-hl5"/>
<constraint firstItem="N1x-QM-Qks" firstAttribute="bottom" secondItem="sKS-nk-f6M" secondAttribute="bottom" constant="44" id="fDF-Mx-Nxy"/>
<constraint firstItem="sKS-nk-f6M" firstAttribute="bottom" secondItem="HAk-oU-gAF" secondAttribute="top" id="gWh-EO-FK9"/>
<constraint firstItem="9mi-yf-jXf" firstAttribute="top" secondItem="SIE-Uh-Zny" secondAttribute="top" id="rED-wA-6gv"/>
<constraint firstItem="9mi-yf-jXf" firstAttribute="top" secondItem="HAk-oU-gAF" secondAttribute="top" id="rED-wA-6gv"/>
<constraint firstItem="9mi-yf-jXf" firstAttribute="trailing" secondItem="HAk-oU-gAF" secondAttribute="trailing" id="tPc-vX-Egd"/>
</constraints>
</view>
Expand Down