From ffa12ac313c770d1f2c4af6b98a4183255aae1e5 Mon Sep 17 00:00:00 2001 From: Horuse <39675195+Horuse@users.noreply.github.com> Date: Sat, 26 Sep 2026 17:55:32 +0300 Subject: [PATCH 1/2] feat(settings): add persistent UI scale control (#51) --- src-tauri/capabilities/default.json | 1 + src/lib/components/layout/header.svelte | 3 +- src/lib/modules/form/ui/password_input.svelte | 2 +- src/lib/modules/settings/stores.svelte.ts | 30 +++++++++++++++++-- src/routes/+layout.svelte | 1 + src/routes/settings/+page.svelte | 21 ++++++++++++- 6 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 9117ac85..c9ddc114 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -5,6 +5,7 @@ "windows": ["main"], "permissions": [ "core:default", + "core:webview:allow-set-webview-zoom", "core:window:allow-start-dragging", "core:window:allow-minimize", "core:window:allow-toggle-maximize", diff --git a/src/lib/components/layout/header.svelte b/src/lib/components/layout/header.svelte index cb0f157d..186bdb73 100644 --- a/src/lib/components/layout/header.svelte +++ b/src/lib/components/layout/header.svelte @@ -50,7 +50,8 @@
+ class={['z-500 flex w-full flex-row items-center gap-8 border-b border-theme/5 bg-background px-1.5', + customTitlebar ? 'h-10 pl-3' : 'h-[max(2.5rem,calc(40px/var(--ui-zoom,1)))] pl-[calc(80px/var(--ui-zoom,1))]']}> {@render left?.()}
diff --git a/src/lib/modules/form/ui/password_input.svelte b/src/lib/modules/form/ui/password_input.svelte index f161bacc..fac8e9ee 100644 --- a/src/lib/modules/form/ui/password_input.svelte +++ b/src/lib/modules/form/ui/password_input.svelte @@ -25,7 +25,7 @@ {/each}
+ +
+ Interface scale + appSettings.setUiScale(v)} /> + % + +
From db664bd9a35e0a855c2f240562162c6a38e87e8d Mon Sep 17 00:00:00 2001 From: Horuse <39675195+Horuse@users.noreply.github.com> Date: Sat, 26 Sep 2026 17:58:26 +0300 Subject: [PATCH 2/2] style(format): code format --- src/lib/components/layout/header.svelte | 6 ++++-- src/routes/settings/+page.svelte | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/components/layout/header.svelte b/src/lib/components/layout/header.svelte index 186bdb73..28663eeb 100644 --- a/src/lib/components/layout/header.svelte +++ b/src/lib/components/layout/header.svelte @@ -50,8 +50,10 @@
+ class={[ + 'z-500 flex w-full flex-row items-center gap-8 border-b border-theme/5 bg-background px-1.5', + customTitlebar ? 'h-10 pl-3' : 'h-[max(2.5rem,calc(40px/var(--ui-zoom,1)))] pl-[calc(80px/var(--ui-zoom,1))]' + ]}> {@render left?.()}
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index cbaecbac..38819a1e 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -7,7 +7,15 @@ import EdgeShapeIcon from '$lib/modules/flow/ui/_edge_shape_icon.svelte'; import Toggle from '$lib/components/toggle.svelte'; import { themeStore, type ThemePref } from '$lib/modules/theme/stores'; - import { appSettings, UI_SCALE_MIN, UI_SCALE_MAX, UI_SCALE_STEP, GRID_SIZES, SNAPSHOT_LIMITS, PIPELINE_SAMPLE_RATE_PRESETS } from '$lib/modules/settings/stores.svelte'; + import { + appSettings, + UI_SCALE_MIN, + UI_SCALE_MAX, + UI_SCALE_STEP, + GRID_SIZES, + SNAPSHOT_LIMITS, + PIPELINE_SAMPLE_RATE_PRESETS + } from '$lib/modules/settings/stores.svelte'; import NumberStepper from '$lib/components/number_stepper.svelte'; import { formatHz } from '$lib/components/format'; import PresetsSection from './_presets_section.svelte';