Comments (13)
@alexgraddev if you're on macos: Did you enable the private apis? It's necessary for transparency, see: https://tauri.app/v1/api/config#tauriconfig.macosprivateapi
from window-vibrancy.
@FabianLars, didn't know about it. Now it works. Thank you!
P.S. I think it should be in the window-vibrancy
documentation, or at least in the example for the Tauri.
from window-vibrancy.
I did some experiments:
Given the empty window, if I drag the mouse through where the heading should be and right click, the menu prompts me to search for the text.
If I remove this line, then the content is correctly displayed, but without vibrancy:
Line 111 in f38bc23
It seems the issue stems from the vibrancy view covering the webkit view.
I wonder if the latest version of tauri, or its creation of the webkit view for macOS 10.13.6 is special, which causes this plugin to add the subview first?
from window-vibrancy.
can you try applying the effect in the Ready
event
from window-vibrancy.
I tried this, same result:
fn main() {
let context = tauri::generate_context!();
tauri::Builder::default()
.menu(if cfg!(target_os = "macos") {
tauri::Menu::os_default(&context.package_info().name)
} else {
tauri::Menu::default()
})
.build(context)
.expect("error while running tauri application")
.run(|app_handle, event| match event {
tauri::RunEvent::Ready {} => {
let window = app_handle.get_window("main").unwrap();
#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::Sidebar)
.expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");
}
_ => {}
});
}
from window-vibrancy.
I have the same issue I think. The WebView background is white. Even if I set it to transparent using CSS. Also I see a vibrancy for a split second when the window is showing.
from window-vibrancy.
Is there a way it can check that and output a message to console if it isn't enabled?
from window-vibrancy.
Yes that would be possible, but imo it should be enough that every transparency api doc mentions it, right?
p.s. i guess adding it to the readme/example here is fair tho? idk
from window-vibrancy.
I think the api doc for transparent is enough. This plugin shouldn't care how you enable transparency for your window.
from window-vibrancy.
I don't think I'm experiencing the same issue as @alexgraddev did.
I have set tauri.macOSPrivateApi
to true
in src-tauri/tauri.conf.json
, same result, and I don't see any white background of web view or vibrancy window for a split second. The vibrancy window always covers everything.
from window-vibrancy.
I don't think I'm experiencing the same issue as @alexgraddev did.
I have set
tauri.macOSPrivateApi
totrue
insrc-tauri/tauri.conf.json
, same result, and I don't see any white background of web view or vibrancy window for a split second. The vibrancy window always covers everything.
I had the same, just added this line to tauri.conf.json
and it works now:
https://github.com/tauri-apps/window-vibrancy/blob/dev/examples/tauri/src-tauri/tauri.conf.json#L57
from window-vibrancy.
@alexgraddev if you're on macos: Did you enable the private apis? It's necessary for transparency, see: https://tauri.app/v1/api/config#tauriconfig.macosprivateapi
I enabled macOSPrivateApi
, set "transparent": true
and it works now. https://github.com/tauri-apps/window-vibrancy/blob/dev/examples/tauri/src-tauri/tauri.conf.json#L57
from window-vibrancy.
Edited the readme instructions mentioning these additional steps. #116
from window-vibrancy.
Related Issues (20)
- Is it possible at all to add vibrancy to an individual HTML element and not the entire window? HOT 4
- corner radius implementation HOT 1
- Focus change breaks shadow & border on macos sonoma HOT 1
- using it with window builder HOT 2
- Blur Effects Causing White Background HOT 3
- After using window vibrancy, the application's drag and drop slows down and becomes transparent during the drag process HOT 1
- Can the app be published to the MacOS App Store? HOT 2
- Mica or tabbed can only take effect on one screen HOT 3
- Any way to use with tauri v2? HOT 1
- Failed to compiled for Tauri. HOT 1
- Get Syntax Error: expected BANG from readme's example code HOT 2
- Effect not applied to background on FLTK on Windows HOT 2
- The trait bound `Window: raw_window_handle::borrowed::HasWindowHandle` is not satisfied HOT 1
- Example code error. `the trait bound `Window: raw_window_handle::borrowed::HasWindowHandle` is not satisfied`
- Does Windows also have radius parameter? HOT 1
- Acrylic effect not working if app is not focused
- Doesn't work on Windows 22H2 HOT 1
- Support Tabbed on Windows 11 HOT 1
- how to create rounded arrow HOT 1
- [Feature Request] Having an option to round corners HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from window-vibrancy.