HMCL
HMCL copied to clipboard
Perf: Optimized list loading of FontComboBox
优化FontComboBox列表加载
缘由
- 若环境中字体过多,列表加载明显缓慢。
更改
- 独立线程加载,避免阻塞UI
- 分批次加载,避免爆发性压力
实况
测试环境字体总数:335
更改前
https://github.com/user-attachments/assets/a334d34c-b0f2-46a9-9b7f-88874878337c
更改后
https://github.com/user-attachments/assets/eea6b3b6-1725-40a9-b826-5294fe5a31db
/gemini review
/gemini review
/gemini review
我考虑之后重构一下,做成基于 LineButton 的实现,让用户在新的对话框中选择字体。