From 3f558e8b4f9c8d84fe255c19efac1d9e6fbfad08 Mon Sep 17 00:00:00 2001 From: CakeAL <1742507190@qq.com> Date: Sat, 13 Jul 2024 11:50:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20macOS=20=E4=B8=8A?= =?UTF-8?q?=201px=20=E7=99=BD=E8=BE=B9=E9=97=AE=E9=A2=98=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E5=9C=86=E8=A7=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .vscode/settings.json | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/src/window.rs | 1 + src-tauri/tauri.conf.json | 3 ++- src/styles.css | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f06235c4..6acc570d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist +.DS_Store \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index e313a6fa..3e393162 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,5 @@ "deno.enablePaths": ["./script"], "deno.lint": true, "deno.unstable": true, - "rust-analyzer.linkedProjects": [".\\src-tauri\\Cargo.toml"] + "rust-analyzer.linkedProjects": ["./src-tauri/Cargo.toml"], } diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 804e1345..70c0089b 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" tauri-build = { version = "2.0.0-beta", features = [] } [dependencies] -tauri = { version = "2.0.0-beta", features = ["tray-icon"] } +tauri = { version = "2.0.0-beta", features = [ "macos-private-api", "tray-icon"] } tauri-plugin-single-instance = "2.0.0-beta" # For base diff --git a/src-tauri/src/window.rs b/src-tauri/src/window.rs index 5db57f3b..7ba1ede3 100644 --- a/src-tauri/src/window.rs +++ b/src-tauri/src/window.rs @@ -14,6 +14,7 @@ pub fn panel(app: &AppHandle) { .visible(false) .shadow(true) .center() + .transparent(true) .build() .expect("Failed to create panel window"); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 3ba30e9f..cda0cf91 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -12,7 +12,8 @@ "withGlobalTauri": false, "security": { "csp": null - } + }, + "macOSPrivateApi": true }, "bundle": { "active": true, diff --git a/src/styles.css b/src/styles.css index a1f57aa6..6b0312a8 100644 --- a/src/styles.css +++ b/src/styles.css @@ -191,6 +191,7 @@ input:-webkit-autofill { overflow: hidden; box-sizing: border-box; border: #434244 1px solid; + border-radius: 8px; } /*