feat: 界面缩放改用后端持久化 + 原生 webview zoom
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
This commit is contained in:
1 parent
81b7219085
commit
34cf186c33
7 files changed
+63
-35
No files matched your search
@@ -1,5 +1,5 @@
|
||||
use crate::api::Result;
|
||||
use tauri::{Emitter, Runtime};
|
||||
use tauri::{Emitter, Manager, Runtime};
|
||||
use theseus::prelude::*;
|
||||
use theseus::{ProxyConfig, ProxyTestResult};
|
||||
|
||||
@@ -12,7 +12,8 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
cancel_directory_change,
|
||||
proxy_get,
|
||||
proxy_set,
|
||||
proxy_test
|
||||
proxy_test,
|
||||
set_ui_scale
|
||||
])
|
||||
.build()
|
||||
}
|
||||
@@ -37,6 +38,17 @@ pub async fn settings_set(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_ui_scale(
|
||||
app: tauri::AppHandle<impl Runtime>,
|
||||
factor: f64,
|
||||
) -> Result<()> {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.set_zoom(factor);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn download_engine_set(
|
||||
engine: settings::DownloadEngine,
|
||||
|
||||
Reference in new issue
Block a user