Skip to content

fix: improve legacy glass readability#722

Merged
everpcpc merged 8 commits intomainfrom
codex/fix-legacy-glass-fallback
Apr 11, 2026
Merged

fix: improve legacy glass readability#722
everpcpc merged 8 commits intomainfrom
codex/fix-legacy-glass-fallback

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

@everpcpc everpcpc commented Apr 11, 2026

Problem

Reader controls that rely on glass styling become hard to read on pre-26 systems because the older fallback path remains too transparent against bright or dark content. The PDF overlay reported in #721 is the clearest example, but the same issue affects shared glass-style buttons more broadly on older OS versions.

Approach

Keep the fix in the shared adaptiveButtonStyle entry point so old systems get a consistent fallback everywhere. Instead of relying on the system bordered style, pre-26 bordered and borderless buttons now use custom chrome with a thicker material background, a light tint overlay, and a matching border shape, while non-button glassEffect usages keep their separate surface fallback. The UIKit reader end-page close button was updated to use the same old-system background treatment.

Scope

  • Replace the pre-26 .bordered and .borderless fallback with custom button chrome in adaptiveButtonStyle
  • Preserve buttonBorderShape(.circle/.capsule) while increasing contrast with thicker background surfaces
  • Keep non-button glassEffect fallback behavior unchanged
  • Update the UIKit reader end-page close button to match the old-system background strategy
  • Bump the build version to 396

Validation

  • make format
  • make build

Provide a shared pre-iOS 26/macOS 26/tvOS 26 fallback for glass-style buttons and glassEffect surfaces so overlay controls remain readable on older systems.

Also update the UIKit end-page close button path to use a matching background treatment, including reduce-transparency fallbacks.
@everpcpc everpcpc force-pushed the codex/fix-legacy-glass-fallback branch from c9dbf76 to 62d26ad Compare April 11, 2026 10:02
Remove the extra legacy glass surface from adaptiveButtonStyle on older systems and keep only a lightweight readability enhancement so button shapes stay unchanged.

Retain surface fallback for non-button glassEffect usages and switch the UIKit end-page close button to shadow-based contrast only.
@everpcpc everpcpc changed the title fix: add legacy glass fallback surfaces fix: improve legacy glass readability Apr 11, 2026
Replace the pre-26 bordered fallback with a custom button chrome that includes a thicker material background and tint overlay while preserving button border shapes.

Also update the UIKit reader end-page close button to use a matching old-system background treatment.
Move the old-system button chrome into a ButtonStyle so shape rendering and hit testing stay attached to the button itself.

This restores circular overlay controls and prevents taps on the button background from falling through to the reader content.
Remove the extra padding from the old-system LegacyGlassButtonStyle so the fallback only draws background chrome and does not change button sizing or layout.
Add back a conservative control-size-based padding layer inside LegacyGlassButtonStyle so the pre-26 fallback matches bordered button spacing more closely without returning to the previous hit-testing issues.
@everpcpc everpcpc merged commit 3ee6d74 into main Apr 11, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/fix-legacy-glass-fallback branch April 11, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant