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
+10
View File
@@ -2,6 +2,7 @@
import { onMount } from 'svelte';
import { appConfig, vaultReady, theme } from '$lib/stores/app';
import { getAppConfig, openVault } from '$lib/api';
import { getCurrentWebview } from '@tauri-apps/api/webview';
import VaultPicker from '$lib/components/VaultPicker.svelte';
import AppLayout from '$lib/components/AppLayout.svelte';
import NoteWindow from '$lib/components/NoteWindow.svelte';
@@ -78,6 +79,15 @@
}
}
// Apply saved interface scale (desktop main window only; no-ops gracefully elsewhere)
if (!noteWindowPath && config.ui_scale && config.ui_scale !== 1) {
try {
await getCurrentWebview().setZoom(config.ui_scale);
} catch (e) {
console.error('Failed to apply interface scale:', e);
}
}
// Auto-open last vault if available
if (config.active_vault) {
try {