Tauri 2.11 doesn't expose set_opacity on its WebviewWindow (open issue tauri-apps/tauri#3279). Drop down to the Win32 API directly: ensure WS_EX_LAYERED is set on the overlay HWND, then SetLayeredWindowAttributes with an 0..255 alpha. This is true OS-level window translucency — the same call Tauri will eventually wrap upstream — not a CSS shim. windows crate version is pinned to 0.61 to match Tauri 2.11.x's transitive dependency, so WebviewWindow::hwnd() returns a compatible HWND with no diamond-dependency conflict. Replaces the earlier eval-based opacity workaround in apply_state and set_window_opacity. Both call sites now go through apply_window_opacity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
41 lines
1.2 KiB
TOML
41 lines
1.2 KiB
TOML
[package]
|
|
name = "browserlay"
|
|
version = "0.1.0"
|
|
description = "A Tauri App"
|
|
authors = ["you"]
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[lib]
|
|
# The `_lib` suffix may seem redundant but it is necessary
|
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
|
name = "browserlay_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
tauri = { version = "2", features = [] }
|
|
tauri-plugin-opener = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
tauri-plugin-store = "2"
|
|
tokio = { version = "1", features = ["time", "macros"] }
|
|
|
|
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
|
tauri-plugin-window-state = "2"
|
|
tauri-plugin-global-shortcut = "2"
|
|
|
|
[target."cfg(windows)".dependencies]
|
|
# Match Tauri 2.11.x's transitive windows version so `WebviewWindow::hwnd()`
|
|
# returns a compatible HWND (no diamond-dependency conflict).
|
|
windows = { version = "0.61", features = [
|
|
"Win32_Foundation",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
|