Conversation
When the user changes the standard font or monospace font via dde-dconfig-editor, handleSettingDConfigChange is triggered but only calls doSetStandardFont/doSetMonospaceFont without calling setStandardFont/setMonospaceFont. As a result, m_property is never updated, the PropertiesChanged DBus signal is not emitted, and the control center UI does not refresh. This patch adds the missing setStandardFont/setMonospaceFont calls (guarded by bSuccess), matching the existing pattern used by the GSKEYGLOBALTHEME branch and the Set method. Fixes: PMS BUG-353505
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's Guide修复通过 dde-dconfig-editor 修改标准字体或等宽字体后控制中心 UI 不刷新的问题:在字体实际应用成功后同步更新对应 DBus 属性,从而触发 PropertiesChanged 和 Q_PROPERTY NOTIFY 通知。 Sequence diagram for font changes from dconfig to refreshed control center UIsequenceDiagram
participant Editor as dde-dconfig-editor
participant Manager as AppearanceManager
participant DBus as DBus Properties
participant ControlCenter as ControlCenter UI
Editor->>Manager: handleSettingDConfigChange(key)
alt standardFont
Manager->>Manager: doSetStandardFont(value)
Manager->>Manager: setStandardFont(value)
else monospaceFont
Manager->>Manager: doSetMonospaceFont(value)
Manager->>Manager: setMonospaceFont(value)
end
Manager->>DBus: PropertiesChanged
DBus-->>ControlCenter: Q_PROPERTY NOTIFY
ControlCenter->>ControlCenter: Refresh displayed font
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
PMS BUG-353505
用户通过 dde-dconfig-editor 手动修改
org.deepin.dde.appearance的标准字体或等宽字体后,控制中心 UI 不刷新,仍显示旧字体。根因
handleSettingDConfigChange中GSKEYFONTSTANDARD/GSKEYFONTMONOSPACE两个分支只调用了doSetStandardFont/doSetMonospaceFont应用字体变更,但遗漏了setStandardFont/setMonospaceFont来更新 DBus 属性m_property。m_property未更新 →PropertiesChangedDBus 信号未发出 → 控制中心 Q_PROPERTY NOTIFY 信号未收到 → UI 不刷新。证据
doSetStandardFont/doSetMonospaceFont内部不调用setXxx(与doSetGtkTheme/doSetIconTheme/doSetCursorTheme内部已调用setXxx不同),形成确定性遗漏。Set方法对TYPESTANDARDFONT/TYPEMONOSPACEFONT使用doSetXxx + setXxx正确写法。handleSettingDConfigChange中GSKEYGLOBALTHEME分支也使用doSetGlobalTheme + setGlobalTheme正确写法(doSetGlobalTheme内部同样不调用setGlobalTheme)。修复
在
handleSettingDConfigChange中为两个分支补充setXxx调用,与GSKEYGLOBALTHEME分支保持一致:改动量:6 行,仅涉及
appearancemanager.cpp。setStandardFont/setMonospaceFont内部有值比对守卫,无重复触发风险。影响
仅 standardFont / monospaceFont 两个设置项受影响,其余设置项不受影响。
Summary by Sourcery
Bug Fixes: