Skip to content

feat: make the Liquid Glass effect opt-out via AlertStyle#6

Merged
patro85 merged 1 commit into
masterfrom
feat/optional-glass-effect
Jun 1, 2026
Merged

feat: make the Liquid Glass effect opt-out via AlertStyle#6
patro85 merged 1 commit into
masterfrom
feat/optional-glass-effect

Conversation

@patro85

@patro85 patro85 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

What

Adds a useGlassEffect: Bool? parameter to AlertStyle.style(...) controlling the iOS/macOS 26 Liquid Glass background:

value behavior
nil (default) / true Liquid Glass on iOS/macOS 26+, classic background below
false always classic solid-color / BlurView background

Why

Follow-up to #4 (glass effect). The original upstream PR (elai950#112) got the feedback "I'd prefer to have this be optional" — some apps' designs don't suit Liquid Glass. This keeps glass on by default where available but lets developers opt out.

Compatibility

The new associated value defaults to nil, so existing .style(...) call sites keep compiling unchanged.

Also

Refreshed the README AlertStyle reference, which was also missing activityIndicatorColor.

Verification

swift build passes on Xcode 26.5.

🤖 Generated with Claude Code

The glass background (added for iOS/macOS 26) is now controllable through
a new `useGlassEffect` parameter on `AlertStyle.style(...)`:

- `nil` (default) / `true`: use Liquid Glass when running on iOS/macOS 26+
- `false`: always keep the classic solid-color / BlurView background

This lets apps whose design doesn't suit Liquid Glass opt out while
keeping glass on by default where available. Addresses the "I'd prefer
to have this be optional" feedback on elai950#112.

The new associated value defaults to nil, so existing `.style(...)`
call sites remain source-compatible. Also refreshed the README
AlertStyle reference (it was missing activityIndicatorColor too).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@patro85 patro85 merged commit 5c67cb5 into master Jun 1, 2026
@patro85 patro85 deleted the feat/optional-glass-effect branch June 1, 2026 17:45
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.

2 participants