From 6a81b3261bc4d3259f2d4aabf0ba8a9412d72440 Mon Sep 17 00:00:00 2001 From: zipg Date: Thu, 23 Jul 2026 12:51:04 +0800 Subject: [PATCH] fix(settings): remove 200% UI scale option --- apps/desktop/src/components/editor/EditorSettingsDialog.vue | 4 ++-- packages/app-tests/settingsStore.test.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue index 45a19d8c6c..15de1fa51d 100644 --- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue +++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue @@ -379,7 +379,7 @@ const editToolbarItems = ref({ ...settingsStore.editorSettings.toolbarItems }); const systemFonts = ref([]); const systemFontsLoading = ref(false); const systemFontsLoaded = ref(false); -const uiScaleOptions = [0.75, 0.9, 0.95, 1, 1.05, 1.1, 1.15, 1.2, 1.25, 1.5, 1.75, 2]; +const uiScaleOptions = [0.75, 0.9, 0.95, 1, 1.05, 1.1, 1.15, 1.2, 1.25, 1.5, 1.75]; const fontSearchTriggerClass = "h-8 w-full max-w-none justify-between gap-1.5 rounded-[6px] border border-input bg-transparent py-2 pl-2.5 pr-2 text-sm font-normal shadow-none hover:bg-transparent focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-expanded:bg-transparent dark:bg-input/30 dark:hover:bg-input/50"; const appearanceFontSearchTriggerClass = `${fontSearchTriggerClass} gap-0 pl-2 pr-1.5`; @@ -3479,7 +3479,7 @@ onUnmounted(cleanupPreviewEditor); " > - + {{ Math.round(editUiScale * 100) }}% {{ Math.round(scale * 100) }}% diff --git a/packages/app-tests/settingsStore.test.ts b/packages/app-tests/settingsStore.test.ts index 9439f64e6a..f3f89fd1a8 100644 --- a/packages/app-tests/settingsStore.test.ts +++ b/packages/app-tests/settingsStore.test.ts @@ -530,6 +530,12 @@ test("normalizeEditorSettings keeps valid UI scales with two-decimal precision", assert.equal(normalizeEditorSettings({ uiScale: 1.125 }).uiScale, 1.13); }); +test("shows persisted UI scales that are not available as presets", () => { + const source = readFileSync("apps/desktop/src/components/editor/EditorSettingsDialog.vue", "utf8"); + + assert.match(source, /\{\{ Math\.round\(editUiScale \* 100\) \}\}%<\/SelectValue>/); +}); + test("defaults SQL formatter settings", () => { assert.deepEqual(DEFAULT_EDITOR_SETTINGS.sqlFormatter, DEFAULT_SQL_FORMATTER_SETTINGS); assert.deepEqual(normalizeEditorSettings({}).sqlFormatter, DEFAULT_EDITOR_SETTINGS.sqlFormatter);