Add Interface Scale setting to zoom the whole app (80-200%)

This commit is contained in:
Yuri Karamian
2026-06-04 19:27:00 +02:00
parent 4b82d51f6c
commit 139ecc8176
8 changed files with 75 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
"windows": ["main"],
"permissions": [
"updater:default",
"window-state:default"
"window-state:default",
"core:webview:allow-set-webview-zoom"
]
}
+8
View File
@@ -103,6 +103,14 @@ pub fn set_line_height(state: State<'_, AppState>, height: f64) -> Result<(), St
Ok(())
}
#[tauri::command]
pub fn set_ui_scale(state: State<'_, AppState>, scale: f64) -> Result<(), String> {
let mut config = state.config.lock().map_err(|e| e.to_string())?;
config.ui_scale = Some(scale);
save_app_config(&config)?;
Ok(())
}
// ── Notebooks ──
#[tauri::command]
+1
View File
@@ -103,6 +103,7 @@ pub fn run() {
commands::set_font_size,
commands::set_font_family,
commands::set_line_height,
commands::set_ui_scale,
commands::get_notebooks,
commands::count_root_notes,
commands::create_notebook,
+3
View File
@@ -70,6 +70,8 @@ pub struct AppConfig {
#[serde(default)]
pub line_height: Option<f64>,
#[serde(default)]
pub ui_scale: Option<f64>,
#[serde(default)]
pub compact_notes: bool,
#[serde(default)]
pub time_format: String,
@@ -167,6 +169,7 @@ impl Default for AppConfig {
font_size: None,
font_family: None,
line_height: None,
ui_scale: None,
compact_notes: false,
time_format: "relative".to_string(),
gpu_acceleration: true,