From 12c62720b3d10600d50bb21647d727844fe70cf0 Mon Sep 17 00:00:00 2001 From: purian23 Date: Fri, 1 Aug 2025 23:02:13 -0400 Subject: [PATCH] Show default font to reflect users choice --- Modules/Settings/AppearanceTab.qml | 14 ++++++++------ Widgets/DankDropdown.qml | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Modules/Settings/AppearanceTab.qml b/Modules/Settings/AppearanceTab.qml index 751ca397..8f4e2268 100644 --- a/Modules/Settings/AppearanceTab.qml +++ b/Modules/Settings/AppearanceTab.qml @@ -108,16 +108,18 @@ ScrollView { text: "Font Family" description: "Select system font family" currentValue: { - if (Prefs.fontFamily === Prefs.defaultFontFamily) - return "Default"; - - return Prefs.fontFamily || "Default"; + // Always show the font name in parentheses for clarity + if (Prefs.fontFamily === Prefs.defaultFontFamily) { + return "Default (" + Prefs.defaultFontFamily + ")"; + } else { + return Prefs.fontFamily || "Default (" + Prefs.defaultFontFamily + ")"; + } } enableFuzzySearch: true popupWidthOffset: 100 maxPopupHeight: 400 options: { - var fonts = ["Default"]; + var fonts = ["Default (" + Prefs.defaultFontFamily + ")"]; var availableFonts = Qt.fontFamilies(); var rootFamilies = []; var seenFamilies = new Set(); @@ -144,7 +146,7 @@ ScrollView { return fonts.concat(rootFamilies.sort()); } onValueChanged: (value) => { - if (value === "Default") + if (value.startsWith("Default (")) Prefs.setFontFamily(Prefs.defaultFontFamily); else Prefs.setFontFamily(value); diff --git a/Widgets/DankDropdown.qml b/Widgets/DankDropdown.qml index 1b81c883..0997749c 100644 --- a/Widgets/DankDropdown.qml +++ b/Widgets/DankDropdown.qml @@ -214,7 +214,7 @@ Rectangle { parent: Overlay.overlay width: dropdown.width + root.popupWidthOffset - height: Math.min(root.maxPopupHeight, (root.enableFuzzySearch ? 48 : 0) + Math.min(filteredOptions.length, 10) * 36 + 16) + height: Math.min(root.maxPopupHeight, (root.enableFuzzySearch ? 54 : 0) + Math.min(filteredOptions.length, 10) * 36 + 16) padding: 0 modal: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside @@ -245,7 +245,7 @@ Rectangle { id: searchContainer width: parent.width - height: 36 + height: 42 visible: root.enableFuzzySearch radius: Theme.cornerRadiusSmall color: Theme.surfaceVariantAlpha