Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(settings): add an opt-in font smoothing toggle

弈秋3d24371e2e23
diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue
index e3ad78d5bb..42fc265937 100644
--- a/apps/desktop/src/App.vue
+++ b/apps/desktop/src/App.vue
@@ -447,6 +447,11 @@ const drawLinuxFloatingFrame = computed(() =>
}),
);
watch(drawLinuxFloatingFrame, (enabled) => document.documentElement.classList.toggle("dbx-linux-floating", enabled), { immediate: true });
+watch(
+ () => settingsStore.editorSettings.fontSmoothing,
+ (enabled) => document.documentElement.classList.toggle("dbx-font-smoothing", enabled),
+ { immediate: true },
+);
// Mirrors the template gate above the app shell. The backend liveness stream is registered
// against it so the web runtime only opens an authenticated subscription.
const appReady = computed(() => !setupRequired.value && (!needsAuth.value || authenticated.value));
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
index e4e7afcdc8..6666aa8539 100644
--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue
+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
@@ -731,6 +731,7 @@ const aiTypographySaving = ref(false);
const editTableFontFamily = ref(settingsStore.editorSettings.tableFontFamily);
const editUiFontFamily = ref(settingsStore.editorSettings.uiFontFamily);
const editUiScale = ref(settingsStore.editorSettings.uiScale);
+const editFontSmoothing = ref(settingsStore.editorSettings.fontSmoothing);
const editTheme = ref(settingsStore.editorSettings.theme);
const editBackgroundImage = ref<BackgroundImageSettings>(cloneBackgroundImageDraft(settingsStore.editorSettings.backgroundImage));
const backgroundImageTransparencyPercent = computed(() => Math.round((1 - editBackgroundImage.value.opacity) * 100));
@@ -1209,6 +1210,7 @@ function currentEditorSettingsDraft(): EditorSettingsDraft {
tableFontFamily: editTableFontFamily.value,
uiFontFamily: editUiFontFamily.value,
uiScale: editUiScale.value,
+ fontSmoothing: editFontSmoothing.value,
theme: editTheme.value,
backgroundImage: editBackgroundImage.value,
customThemes: editCustomThemes.value,
@@ -1913,6 +1915,7 @@ function syncEditorSettingsDraftFromStore() {
editTableFontFamily.value = settingsStore.editorSettings.tableFontFamily;
editUiFontFamily.value = settingsStore.editorSettings.uiFontFamily;
editUiScale.value = settingsStore.editorSettings.uiScale;
+ editFontSmoothing.value = settingsStore.editorSettings.fontSmoothing;
editTheme.value = settingsStore.editorSettings.theme;
editBackgroundImage.value = cloneBackgroundImageDraft(settingsStore.editorSettings.backgroundImage);
pendingBackgroundImageCleanup = null;
@@ -2100,6 +2103,7 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = {
tableFontFamily: editTableFontFamily,
uiFontFamily: editUiFontFamily,
uiScale: editUiScale,
+ fontSmoothing: editFontSmoothing,
theme: editTheme,
backgroundImage: editBackgroundImage,
customThemes: editCustomThemes,
@@ -2764,6 +2768,7 @@ function resetDefaultsForTab(tab: SettingsCategory) {
editTableFontFamily.value = DEFAULT_EDITOR_SETTINGS.tableFontFamily;
editUiFontFamily.value = DEFAULT_EDITOR_SETTINGS.uiFontFamily;
editUiScale.value = DEFAULT_EDITOR_SETTINGS.uiScale;
+ editFontSmoothing.value = DEFAULT_EDITOR_SETTINGS.fontSmoothing;
editTheme.value = DEFAULT_EDITOR_SETTINGS.theme;
editCustomThemes.value = [...DEFAULT_EDITOR_SETTINGS.customThemes];
editActiveCustomThemeId.value = DEFAULT_EDITOR_SETTINGS.activeCustomThemeId;
@@ -2914,6 +2919,7 @@ function resetAllDefaults() {
editTableFontFamily.value = DEFAULT_EDITOR_SETTINGS.tableFontFamily;
editUiFontFamily.value = DEFAULT_EDITOR_SETTINGS.uiFontFamily;
editUiScale.value = DEFAULT_EDITOR_SETTINGS.uiScale;
+ editFontSmoothing.value = DEFAULT_EDITOR_SETTINGS.fontSmoothing;
editTheme.value = DEFAULT_EDITOR_SETTINGS.theme;
editCustomThemes.value = [...DEFAULT_EDITOR_SETTINGS.customThemes];
editActiveCustomThemeId.value = DEFAULT_EDITOR_SETTINGS.activeCustomThemeId;
@@ -8610,6 +8616,16 @@ onUnmounted(() => {
</template>
</div>
+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">
+ <div class="flex items-center gap-2">
+ <Label for="font-smoothing">{{ t("settings.fontSmoothing") }}</Label>
+ <HelpTooltip :label="t('settings.fontSmoothing')">
+ {{ t("settings.fontSmoothingDescription") }}
+ </HelpTooltip>
+ </div>
+ <Switch id="font-smoothing" v-model="editFontSmoothing" />
+ </div>
+
<div class="grid gap-3 md:grid-cols-2">
<div class="settings-appearance-field min-w-0">
<div class="flex min-w-0 items-center gap-1">
diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.ts
index ad91faa9c7..9c9d3142cb 100644
--- a/apps/desktop/src/i18n/locales/az.ts
+++ b/apps/desktop/src/i18n/locales/az.ts
@@ -7625,6 +7625,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Sağ yan paneldə bir panelin açılması digərlərini bağlayır. Bir neçə panelə icazə vermək üçün bunu deaktiv edin.",
uiScale: "İnterfeys miqyası",
uiScaleDescription: "Yüksək DPI ekranları üçün bütün masaüstü interfeysinin miqyasını dəyişin. Dəyişikliklər dərhal tətbiq olunur və növbəti işəsalmada bərpa edilir.",
+ fontSmoothing: "Şrift hamarlanması",
+ fontSmoothingDescription: "macOS tərzi şrift hamarlanması (antialiasing) tətbiq edir. Bəzi ekranlarda incə və ya bulanıq görünə bilər.",
theme: "Tema",
cornerStyle: "Künc üslubu",
backgroundImage: "Fon şəkli",
diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.ts
index 6d1d8fe007..58726f358c 100644
--- a/apps/desktop/src/i18n/locales/en.ts
+++ b/apps/desktop/src/i18n/locales/en.ts
@@ -10032,6 +10032,8 @@ export default {
exclusiveRightSidebarPanelsDescription: "Opening a right sidebar panel closes the others. Disable this to allow multiple panels.",
uiScale: "UI Scale",
uiScaleDescription: "Scale the entire desktop UI for high-DPI displays. Changes apply immediately and are restored on next launch.",
+ fontSmoothing: "Smooth fonts",
+ fontSmoothingDescription: "Apply macOS-style font smoothing (antialiased rendering). May look thin or blurry on some displays.",
theme: "Theme",
cornerStyle: "Corner style",
backgroundImage: "Background image",
diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.ts
index 49ddbfd134..e549034f15 100644
--- a/apps/desktop/src/i18n/locales/es.ts
+++ b/apps/desktop/src/i18n/locales/es.ts
@@ -8842,6 +8842,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Al abrir un panel lateral derecho se cierran los demás. Desactívalo para permitir varios paneles.",
uiScale: "Escala de interfaz",
uiScaleDescription: "Escala toda la interfaz de escritorio para pantallas de alta densidad. Los cambios se aplican al instante y se restauran al volver a abrir.",
+ fontSmoothing: "Suavizado de fuentes",
+ fontSmoothingDescription: "Aplica el suavizado de fuentes estilo macOS (antialiasing). Puede verse fino o borroso en algunas pantallas.",
theme: "Tema",
cornerStyle: "Estilo de esquinas",
backgroundImage: "Imagen de fondo",
diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.ts
index 33cbbe7285..03602109e2 100644
--- a/apps/desktop/src/i18n/locales/id.ts
+++ b/apps/desktop/src/i18n/locales/id.ts
@@ -8366,6 +8366,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Membuka panel bilah sisi kanan akan menutup panel lainnya. Nonaktifkan untuk mengizinkan beberapa panel sekaligus.",
uiScale: "Skala UI",
uiScaleDescription: "Skalakan seluruh UI desktop untuk layar high-DPI. Perubahan berlaku langsung dan dipulihkan pada peluncuran berikutnya.",
+ fontSmoothing: "Penghalusan font",
+ fontSmoothingDescription: "Menerapkan penghalusan font gaya macOS (antialiasing). Bisa tampak tipis atau buram di beberapa layar.",
theme: "Tema",
cornerStyle: "Gaya sudut",
backgroundImage: "Gambar latar belakang",
diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.ts
index b7729ee0c6..4258a98021 100644
--- a/apps/desktop/src/i18n/locales/it.ts
+++ b/apps/desktop/src/i18n/locales/it.ts
@@ -8620,6 +8620,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "L'apertura di un pannello laterale destro chiude gli altri. Disattiva per consentire più pannelli.",
uiScale: "Scala UI",
uiScaleDescription: "Scala l'intera interfaccia utente desktop per display ad alta densità (High-DPI). Le modifiche si applicano immediatamente e vengono ripristinate al prossimo avvio.",
+ fontSmoothing: "Smussamento caratteri",
+ fontSmoothingDescription: "Applica lo smussamento dei caratteri in stile macOS (antialiasing). Può apparire sottile o sfocato su alcuni schermi.",
theme: "Tema",
cornerStyle: "Stile degli angoli",
backgroundImage: "Immagine di sfondo",
diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.ts
index ecd6630808..67ed42bd63 100644
--- a/apps/desktop/src/i18n/locales/ja.ts
+++ b/apps/desktop/src/i18n/locales/ja.ts
@@ -8640,6 +8640,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "右サイドバーのパネルを開くと他のパネルを閉じます。複数表示するには無効にします。",
uiScale: "UIスケール",
uiScaleDescription: "高DPIディスプレイ向けにデスクトップUI全体をスケーリングします。変更は即座に適用され、次回起動時に復元されます。",
+ fontSmoothing: "フォントスムージング",
+ fontSmoothingDescription: "macOS 風のフォントスムージング(アンチエイリアス)を適用します。環境によっては細くぼやけて見えることがあります。",
theme: "テーマ",
cornerStyle: "角の丸み",
backgroundImage: "背景画像",
diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.ts
index 263f4efe28..7129832b59 100644
--- a/apps/desktop/src/i18n/locales/ko.ts
+++ b/apps/desktop/src/i18n/locales/ko.ts
@@ -8746,6 +8746,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "오른쪽 사이드바 패널을 열면 다른 패널을 닫습니다. 여러 패널을 허용하려면 비활성화하세요.",
uiScale: "UI 배율",
uiScaleDescription: "고해상도 디스플레이를 위해 전체 데스크톱 UI를 확장합니다. 변경 사항은 즉시 적용되며 다음 실행 시 복원됩니다.",
+ fontSmoothing: "폰트 스무딩",
+ fontSmoothingDescription: "macOS 스타일 폰트 스무딩(안티에일리어싱)을 적용합니다. 일부 화면에서는 얇거나 흐릿하게 보일 수 있습니다.",
theme: "테마",
cornerStyle: "모서리 스타일",
backgroundImage: "배경 이미지",
diff --git a/apps/desktop/src/i18n/locales/pl.ts b/apps/desktop/src/i18n/locales/pl.ts
index 798b45c8ad..af4e53886c 100644
--- a/apps/desktop/src/i18n/locales/pl.ts
+++ b/apps/desktop/src/i18n/locales/pl.ts
@@ -8430,6 +8430,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Otwarcie prawego panelu bocznego zamyka pozostałe. Wyłącz, aby zezwolić na wiele paneli.",
uiScale: "Skalowanie interfejsu",
uiScaleDescription: "Skaluj cały interfejs aplikacji desktopowej dla ekranów o wysokiej gęstości pikseli (HiDPI). Zmiany wchodzą w życie natychmiast i są przywracane przy kolejnym uruchomieniu.",
+ fontSmoothing: "Wygładzanie czcionek",
+ fontSmoothingDescription: "Stosuje wygładzanie czcionek w stylu macOS (antyaliasing). Na niektórych ekranach może wyglądać cienko lub rozmycie.",
theme: "Motyw",
cornerStyle: "Styl narożników",
backgroundImage: "Obraz tła",
diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.ts
index 32e897c738..fbd876e3a7 100644
--- a/apps/desktop/src/i18n/locales/pt-BR.ts
+++ b/apps/desktop/src/i18n/locales/pt-BR.ts
@@ -8619,6 +8619,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Abrir um painel lateral direito fecha os demais. Desative para permitir vários painéis.",
uiScale: "Escala da UI",
uiScaleDescription: "Dimensione toda a UI do desktop para telas de alta resolução (high-DPI). As alterações são aplicadas imediatamente e restauradas na próxima inicialização.",
+ fontSmoothing: "Suavização de fontes",
+ fontSmoothingDescription: "Aplica suavização de fontes estilo macOS (antialiasing). Pode parecer fino ou borrado em algumas telas.",
theme: "Tema",
cornerStyle: "Estilo dos cantos",
backgroundImage: "Imagem de fundo",
diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.ts
index c7bf23fe10..f55a4115e3 100644
--- a/apps/desktop/src/i18n/locales/ru.ts
+++ b/apps/desktop/src/i18n/locales/ru.ts
@@ -10195,6 +10195,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Открытие панели правой боковой панели закрывает остальные. Отключите, чтобы разрешить несколько панелей.",
uiScale: "Масштаб интерфейса",
uiScaleDescription: "Масштабировать весь интерфейс приложения для дисплеев с высоким DPI. Изменения применяются сразу и восстанавливаются при следующем запуске.",
+ fontSmoothing: "Сглаживание шрифтов",
+ fontSmoothingDescription: "Применяет сглаживание шрифтов в стиле macOS (антиалиасинг). На некоторых экранах может выглядеть тонко или размыто.",
theme: "Тема",
cornerStyle: "Стиль углов",
backgroundImage: "Фоновое изображение",
diff --git a/apps/desktop/src/i18n/locales/th.ts b/apps/desktop/src/i18n/locales/th.ts
index d0293540a5..fc1781c383 100644
--- a/apps/desktop/src/i18n/locales/th.ts
+++ b/apps/desktop/src/i18n/locales/th.ts
@@ -10575,6 +10575,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "การเปิดแผง Sidebar ขวาจะปิดแผงอื่น ปิดตัวเลือกนี้เพื่ออนุญาตหลายแผง",
uiScale: "มาตราส่วน UI",
uiScaleDescription: "ปรับขนาด UI ทั้งหมดสำหรับจอภาพ High-DPI การเปลี่ยนแปลงมีผลทันทีและคืนค่าเมื่อเปิดครั้งถัดไป",
+ fontSmoothing: "การเกลาฟอนต์",
+ fontSmoothingDescription: "ใช้การเกลาฟอนต์แบบ macOS (anti-aliasing) อาจดูบางหรือเบลือบนบางจอ",
theme: "ธีม",
cornerStyle: "รูปแบบมุม",
backgroundImage: "รูปภาพพื้นหลัง",
diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.ts
index ba1008016f..cbc8055b4e 100644
--- a/apps/desktop/src/i18n/locales/tr.ts
+++ b/apps/desktop/src/i18n/locales/tr.ts
@@ -7506,6 +7506,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "Bir sağ kenar paneli açıldığında diğerleri kapanır. Birden çok panele izin vermek için bunu kapatın.",
uiScale: "Arayüz Ölçeği",
uiScaleDescription: "Yüksek DPI ekranlar için tüm masaüstü arayüzünü ölçekleyin. Değişiklikler hemen uygulanır ve sonraki açılışta geri yüklenir.",
+ fontSmoothing: "Yazı tipi yumuşatma",
+ fontSmoothingDescription: "macOS tarzı yazı tipi yumuşatma (antialiasing) uygular. Bazı ekranlarda ince veya bulanık görünebilir.",
theme: "Tema",
cornerStyle: "Köşe biçemi",
backgroundImage: "Arka plan resmi",
diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.ts
index 41b8633a7a..289015097f 100644
--- a/apps/desktop/src/i18n/locales/zh-CN.ts
+++ b/apps/desktop/src/i18n/locales/zh-CN.ts
@@ -9999,6 +9999,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "打开一个右侧面板时关闭其他面板。关闭此选项可同时显示多个面板。",
uiScale: "界面缩放",
uiScaleDescription: "按比例缩放整个桌面端界面,适合高清屏;修改后立即生效,并在下次启动时恢复。",
+ fontSmoothing: "字体平滑",
+ fontSmoothingDescription: "启用 macOS 风格的字体平滑渲染(抗锯齿)。部分屏幕上可能显得偏细或发虚。",
theme: "主题",
cornerStyle: "圆角样式",
backgroundImage: "背景图片",
diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.ts
index c511c4f72e..717446d725 100644
--- a/apps/desktop/src/i18n/locales/zh-TW.ts
+++ b/apps/desktop/src/i18n/locales/zh-TW.ts
@@ -7743,6 +7743,8 @@ export default withEnglishFallback({
exclusiveRightSidebarPanelsDescription: "開啟一個右側面板時關閉其他面板。關閉此選項可同時顯示多個面板。",
uiScale: "介面縮放",
uiScaleDescription: "按比例縮放整個桌面端介面,適合高 DPI 螢幕;修改後立即生效,並在下次啟動時復原。",
+ fontSmoothing: "字型平滑",
+ fontSmoothingDescription: "啟用 macOS 風格的字型平滑渲染(抗鋸齒)。部分螢幕上可能顯得偏細或發虛。",
theme: "主題",
cornerStyle: "圓角樣式",
backgroundImage: "背景图片",
diff --git a/apps/desktop/src/lib/settings/editorSettingsDraft.ts b/apps/desktop/src/lib/settings/editorSettingsDraft.ts
index 51cd346459..11101e089c 100644
--- a/apps/desktop/src/lib/settings/editorSettingsDraft.ts
+++ b/apps/desktop/src/lib/settings/editorSettingsDraft.ts
@@ -18,6 +18,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = [
"tableFontFamily",
"uiFontFamily",
"uiScale",
+ "fontSmoothing",
"theme",
"backgroundImage",
"customThemes",
diff --git a/apps/desktop/src/lib/settings/settingsSearch.ts b/apps/desktop/src/lib/settings/settingsSearch.ts
index 9b3bfe7478..909767e92a 100644
--- a/apps/desktop/src/lib/settings/settingsSearch.ts
+++ b/apps/desktop/src/lib/settings/settingsSearch.ts
@@ -307,6 +307,7 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] =
{ id: "appearance-theme", category: "appearance", titleKey: "settings.theme", targetId: "appearance" },
{ id: "appearance-color-theme", category: "appearance", titleKey: "settings.colorTheme", targetId: "appearance", keywordKeys: APP_CUSTOM_UI_COLOR_DEFS.map((item) => item.labelKey) },
{ id: "appearance-ui-scale", category: "appearance", titleKey: "settings.uiScale", descriptionKey: "settings.uiScaleDescription", targetId: "appearance" },
+ { id: "appearance-font-smoothing", category: "appearance", titleKey: "settings.fontSmoothing", descriptionKey: "settings.fontSmoothingDescription", targetId: "appearance" },
{ id: "appearance-ui-font", category: "appearance", titleKey: "settings.uiFontFamily", descriptionKey: "settings.uiFontFamilyDescription", targetId: "appearance" },
{ id: "appearance-grid-font", category: "appearance", titleKey: "settings.dataGridFontFamily", descriptionKey: "settings.dataGridFontFamilyDescription", targetId: "appearance" },
{ id: "appearance-corners", category: "appearance", titleKey: "settings.cornerStyle", targetId: "appearance" },
diff --git a/apps/desktop/src/lib/settings/settingsTransfer.ts b/apps/desktop/src/lib/settings/settingsTransfer.ts
index 16d0cd8437..fda2670883 100644
--- a/apps/desktop/src/lib/settings/settingsTransfer.ts
+++ b/apps/desktop/src/lib/settings/settingsTransfer.ts
@@ -135,7 +135,7 @@ export function serializeSettingsTransfer(settings: EditorSettings, meta: Settin
const SETTINGS_TRANSFER_CATEGORY_ORDER: readonly SettingsTransferCategoryId[] = ["appearance", "editor", "formatter", "navigation", "data", "shortcuts", "snippets", "other"];
const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readonly EditorSettingsDraftKey[]> = {
- appearance: ["fontFamily", "fontSize", "tableFontFamily", "uiFontFamily", "uiScale", "theme", "customThemes", "activeCustomThemeId", "backgroundImage", "toolbarItems", "welcomePageMode", "webLogoPosition"],
+ appearance: ["fontFamily", "fontSize", "tableFontFamily", "uiFontFamily", "uiScale", "fontSmoothing", "theme", "customThemes", "activeCustomThemeId", "backgroundImage", "toolbarItems", "welcomePageMode", "webLogoPosition"],
editor: [
"executeMode",
"defaultTransactionMode",
@@ -375,6 +375,7 @@ const PASS_THROUGH_BOOLEAN_KEYS = [
"autoAliasTables",
"functionCompletionIncludeParams",
"sequenceCompletionEnabled",
+ "fontSmoothing",
"confirmDangerousSqlExecution",
"confirmUnsavedSqlClose",
"showColumnCommentsInHeader",
diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.ts
index be59c38186..257ffeadc5 100644
--- a/apps/desktop/src/stores/settingsStore.ts
+++ b/apps/desktop/src/stores/settingsStore.ts
@@ -986,6 +986,8 @@ export interface EditorSettings {
aiFontFamily: string;
aiFontSize: number;
uiScale: number;
+ /** macOS-style font smoothing (antialiased + grayscale); off keeps the platform default. */
+ fontSmoothing: boolean;
theme: EditorTheme;
backgroundImage: BackgroundImageSettings;
customThemeColors: CustomThemeColors;
@@ -1385,6 +1387,7 @@ export const DEFAULT_EDITOR_SETTINGS: EditorSettings = {
aiFontFamily: AI_CONVERSATION_FONT_FAMILY_DEFAULT,
aiFontSize: AI_CONVERSATION_FONT_SIZE_DEFAULT,
uiScale: 1,
+ fontSmoothing: false,
theme: "app",
backgroundImage: defaultBackgroundImageSettings(),
customThemeColors: { ...DEFAULT_CUSTOM_THEME_COLORS },
@@ -2082,6 +2085,7 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, exist
aiFontFamily: normalizeAiConversationFontFamily(settings.aiFontFamily),
aiFontSize: normalizeAiConversationFontSize(settings.aiFontSize),
uiScale: normalizeUiScale(settings.uiScale),
+ fontSmoothing: settings.fontSmoothing === true,
theme: settings.theme && EDITOR_THEME_VALUES.has(settings.theme) ? settings.theme : DEFAULT_EDITOR_SETTINGS.theme,
customThemeColors: {
...DEFAULT_CUSTOM_THEME_COLORS,
@@ -3001,6 +3005,7 @@ export const useSettingsStore = defineStore("settings", () => {
if (partial.aiFontFamily !== undefined) editorSettings.value.aiFontFamily = normalizeAiConversationFontFamily(partial.aiFontFamily);
if (partial.aiFontSize !== undefined) editorSettings.value.aiFontSize = normalizeAiConversationFontSize(partial.aiFontSize);
if (partial.uiScale !== undefined) editorSettings.value.uiScale = normalizeUiScale(partial.uiScale);
+ if (partial.fontSmoothing !== undefined) editorSettings.value.fontSmoothing = partial.fontSmoothing === true;
if (partial.backgroundImage !== undefined) editorSettings.value.backgroundImage = normalizeBackgroundImageSettings(partial.backgroundImage);
if (partial.theme !== undefined) editorSettings.value.theme = partial.theme;
if (partial.customThemeColors !== undefined) {
diff --git a/apps/desktop/src/styles/__tests__/fontRendering.spec.ts b/apps/desktop/src/styles/__tests__/fontRendering.spec.ts
index 3447f7f234..870f589ae5 100644
--- a/apps/desktop/src/styles/__tests__/fontRendering.spec.ts
+++ b/apps/desktop/src/styles/__tests__/fontRendering.spec.ts
@@ -4,8 +4,17 @@ import { describe, expect, it } from "vitest";
const globalsCss = readFileSync(new URL("../globals.css", import.meta.url), "utf8");
describe("global font rendering", () => {
- it("leaves font smoothing to the operating system", () => {
- expect(globalsCss).not.toContain("-webkit-font-smoothing");
- expect(globalsCss).not.toContain("-moz-osx-font-smoothing");
+ it("leaves font smoothing to the operating system by default", () => {
+ // The base body rule must stay smoothing-free; the opt-in lives behind
+ // html.dbx-font-smoothing so the default rendering is unchanged (#13359).
+ const bodyRule = globalsCss.match(/\n body \{[^}]*\}/)?.[0] ?? "";
+ expect(bodyRule).not.toContain("-webkit-font-smoothing");
+ expect(bodyRule).not.toContain("-moz-osx-font-smoothing");
+ });
+
+ it("restores macOS-style smoothing only under the opt-in class", () => {
+ const optIn = globalsCss.match(/html\.dbx-font-smoothing body \{[^}]*\}/)?.[0] ?? "";
+ expect(optIn).toContain("-webkit-font-smoothing: antialiased");
+ expect(optIn).toContain("-moz-osx-font-smoothing: grayscale");
});
});
diff --git a/apps/desktop/src/styles/__tests__/fontSmoothing.spec.ts b/apps/desktop/src/styles/__tests__/fontSmoothing.spec.ts
new file mode 100644
index 0000000000..5a4713d8d9
--- /dev/null
+++ b/apps/desktop/src/styles/__tests__/fontSmoothing.spec.ts
@@ -0,0 +1,29 @@
+import { readFileSync } from "node:fs";
+import { describe, expect, it } from "vitest";
+import { createPinia, setActivePinia } from "pinia";
+import { useSettingsStore } from "@/stores/settingsStore";
+
+const globalsCss = readFileSync(new URL("../globals.css", import.meta.url), "utf8");
+
+describe("font smoothing setting (#13359)", () => {
+ it("defaults to off and round-trips through the settings store", () => {
+ const pinia = createPinia();
+ setActivePinia(pinia);
+ const settings = useSettingsStore();
+ expect(settings.editorSettings.fontSmoothing).toBe(false);
+
+ settings.updateEditorSettings({ fontSmoothing: true });
+ expect(settings.editorSettings.fontSmoothing).toBe(true);
+ settings.updateEditorSettings({ fontSmoothing: false });
+ expect(settings.editorSettings.fontSmoothing).toBe(false);
+ });
+
+ it("only applies smoothing under the opt-in class", () => {
+ // The base body rule keeps the platform default; smoothing lives behind
+ // html.dbx-font-smoothing so the off state is byte-identical to pre-#13359.
+ expect(globalsCss).toContain("html.dbx-font-smoothing body");
+ expect(globalsCss).toContain("-webkit-font-smoothing: antialiased");
+ const bodyRule = globalsCss.match(/body \{[^}]*\}/)?.[0] ?? "";
+ expect(bodyRule).not.toContain("font-smoothing");
+ });
+});
diff --git a/apps/desktop/src/styles/globals.css b/apps/desktop/src/styles/globals.css
index 9991268567..d7a3526c5a 100644
--- a/apps/desktop/src/styles/globals.css
+++ b/apps/desktop/src/styles/globals.css
@@ -1573,6 +1573,12 @@ html.dbx-data-grid-native-selection-blocked [role="textbox"] * {
text-rendering: geometricPrecision;
font-synthesis: none;
}
+ /* Opt-in (#13359): macOS-style smoothing renders some fonts thin and blurry
+ * depending on the display and personal taste, so it stays off by default. */
+ html.dbx-font-smoothing body {
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
button,
[role="button"],
[role="menuitem"],
@@ -2830,13 +2836,17 @@ html.theme-vscode .app-tab-scroll.wrap-mode .app-tab-pill[data-active-tab="false
height: 3px;
border-radius: 999px;
background: currentColor;
- box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
+ box-shadow:
+ 0 5px 0 currentColor,
+ 0 10px 0 currentColor;
color: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
content: "";
opacity: 0.75;
pointer-events: none;
transform: translate(-50%, -50%);
- transition: color 140ms ease, opacity 140ms ease;
+ transition:
+ color 140ms ease,
+ opacity 140ms ease;
}
.panel-resize-handle:hover::before,
.panel-resize-handle:focus-visible::before,