Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: clear_vibrancy, NSVisualEffectViewTagged #169

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

petersamokhin
Copy link
Contributor

Once merged, this PR will:

  • Update .gitignore to add IntelliJ IDEA and macOS specific files
  • Using objc2, implement a subclass for NSVisualEffectView with a custom tag, to find the view in the window
  • Implement clear_vibrancy (similar to the existing clear_blur, clear_mica, etc.) by finding the custom blurred view and removing it from the window

Tested on macOS 15.3 ✅

…w; implement a NSVisualEffectView subview with tag for matching the blurred view in the window; add IntelliJ IDEA and macOS-specific files to gitignore
@petersamokhin petersamokhin force-pushed the feature-macos-vibrancy-clear branch from a3471d8 to 7174bf4 Compare February 6, 2025 23:39
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved from macos.rs to macos/mod.rs + macos/internal.rs + macos/ns_visual_effect_view_tagged.rs.
Public API contract of this crate is not affected

@petersamokhin
Copy link
Contributor Author

btw @amrbashir is this separate repo deprecated or not?
I see some support embedded in tauri: https://github.com/tauri-apps/tauri/blob/dev/crates/tauri/src/vibrancy/macos.rs

we can merge this PR and I can prepare another one for tauri, if it makes sense

@amrbashir
Copy link
Member

It is not deprecated, tauri uses it under the hood. The file you linked, just does some conversions from tauri types to this crate types.

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a change file in .changes directory?

---
"window-vibrancy": "patch:bug"
---

Add `clear_vibrancy` function on macOS.

@petersamokhin
Copy link
Contributor Author

@amrbashir thanks, added 🫡 Btw, I added this as a patch:enhance, as it wasn't related to any bug.

@amrbashir amrbashir merged commit 953f69a into tauri-apps:dev Feb 12, 2025
10 checks passed
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