Skip to content

Commit 53ae56c

Browse files
committed
fix: handle font change events in dialog
Fix dialog size not updating when system font changes Add font change event handling to recalculate dialog size Ensure proper layout when font size or family changes Influence: 1. Test dialog appearance when system font settings change 2. Verify dialog size adapts correctly to different font sizes 3. Check layout integrity after font changes 4. Test with various font families and sizes fix: 处理对话框中的字体变更事件 修复系统字体变更时对话框大小不更新的问题 添加字体变更事件处理以重新计算对话框大小 确保字体大小或字体家族变更时的正确布局 Influence: 1. 测试系统字体设置变更时对话框的显示效果 2. 验证对话框大小是否正确适应不同的字体大小 3. 检查字体变更后的布局完整性 4. 测试不同字体家族和大小的显示效果 PMS: BUG-331061
1 parent 731810a commit 53ae56c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/widgets/ddialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,8 @@ void DDialog::changeEvent(QEvent *event)
12201220
}
12211221
}
12221222
d->updateSize();
1223+
} else if (event->type() == QEvent::FontChange) {
1224+
d->updateSize();
12231225
}
12241226
return DAbstractDialog::changeEvent(event);
12251227
}

0 commit comments

Comments
 (0)