Update OptionSettingWindow.axaml.cs

This commit is contained in:
JieXu 2026-05-28 14:40:50 +08:00 committed by GitHub
parent 896938b5e6
commit f47fafe1fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,14 +155,8 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
{ {
var lstFonts = await GetFonts(); var lstFonts = await GetFonts();
lstFonts.Insert(0, string.Empty); lstFonts.Add(string.Empty);
cmbcurrentFontFamily.ItemsSource = lstFonts; cmbcurrentFontFamily.ItemsSource = lstFonts;
if (ViewModel?.CurrentFontFamily.IsNullOrEmpty() == true)
{
cmbcurrentFontFamily.SelectedIndex = 0;
cmbcurrentFontFamily.Text = string.Empty;
}
} }
private async Task<List<string>> GetFonts() private async Task<List<string>> GetFonts()