window vibrancy
vibrancy v0.5.2
창문을 활기차게 만드십시오.
팁
tauri@v1 사용하는 경우이 상자의 0.4 버전을 사용해야합니다.
use window_vibrancy :: { apply_blur , apply_vibrancy , NSVisualEffectMaterial } ;
# [ cfg ( target_os = "macos" ) ]
apply_vibrancy ( & window , NSVisualEffectMaterial :: HudWindow , None , None ) . expect ( "Unsupported platform! 'apply_vibrancy' is only supported on macOS" ) ;
# [ cfg ( target_os = "windows" ) ]
apply_blur ( & window , Some ( ( 18 , 18 , 18 , 125 ) ) ) . expect ( "Unsupported platform! 'apply_blur' is only supported on Windows" ) ; Tauri를 사용하는 경우 다음을 잊지 마십시오.
html, body { background: transparent } index.html#l12를 참조하십시오"windows": [ { "transparent": true } ]"macOSPrivateApi": true tauri.conf.json#l49를 참조하십시오 Tauri와 함께 사용되는보다 완전한 예제는 examples/tauri 참조하십시오.
| 기능 | 지원되는 플랫폼 | 메모 |
|---|---|---|
apply_blur & clear_blur | Windows 7/10/11 (22H1 만 해당) | Windows 11에서 창을 크기를 조정/드래그 할 때 성능이 좋지 않습니다. 빌드 22621+. |
apply_acrylic & clear_acrylic | Windows 10/11 | Windows 10 V1903+ 및 Windows 11 빌드 22000에서 창을 크기를 조정/드래그 할 때 성능이 좋지 않습니다. |
apply_mica & clear_mica | Windows 11 | |
apply_vibrancy | MacOS 10.10 및 새로운 |
| apply_blur | apply_acrylic | apply_mica | apply_vibrancy |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |