fix: use application theme window radius and listen for changes - #269
Merged
18202781743 merged 1 commit intoJun 12, 2026
Merged
Conversation
1. Replace window handle's local window radius with application theme's window radius for consistency 2. Add listener for windowRadiusChanged signal to update corner radius dynamically 3. Ensure the window radius updates when application theme properties change Influence: 1. Verify window corner radius matches the application theme setting 2. Test that changing application theme updates corner radius in real- time 3. Check that corner radius remains consistent across different system themes 4. Validate no visual glitches when radius changes during runtime PMS: BUG-289145
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAligns the main window’s corner radius with the application theme and keeps it updated when the theme’s window radius changes. Sequence diagram for window radius updates from application themesequenceDiagram
participant DGuiApplicationHelper
participant DPlatformTheme
participant MainWindow
participant DPlatformWindowHandle
rect rgb(230,230,230)
MainWindow->>DGuiApplicationHelper: instance()
DGuiApplicationHelper-->>MainWindow: DGuiApplicationHelper*
MainWindow->>DGuiApplicationHelper: applicationTheme()
DGuiApplicationHelper-->>MainWindow: DPlatformTheme*
MainWindow->>DPlatformTheme: windowRadius()
DPlatformTheme-->>MainWindow: int
MainWindow->>DPlatformWindowHandle: setWindowRadius(m_cornerRadius)
end
rect rgb(230,230,230)
DPlatformTheme-->>MainWindow: windowRadiusChanged(newRadius)
alt [m_cornerRadius != newRadius]
MainWindow->>MainWindow: update m_cornerRadius
MainWindow->>DPlatformWindowHandle: setWindowRadius(m_cornerRadius)
MainWindow->>MainWindow: update()
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- You call
DGuiApplicationHelper::instance()->applicationTheme()twice ininitUIandinitConnect; consider retrieving the theme once (or storing it as a member) and reusing it to avoid duplication and potential inconsistencies if the theme object changes. - Before using
themein bothinitUIandinitConnect, consider guarding against a nullapplicationTheme()pointer to avoid crashes in case it is not available in some environments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You call `DGuiApplicationHelper::instance()->applicationTheme()` twice in `initUI` and `initConnect`; consider retrieving the theme once (or storing it as a member) and reusing it to avoid duplication and potential inconsistencies if the theme object changes.
- Before using `theme` in both `initUI` and `initConnect`, consider guarding against a null `applicationTheme()` pointer to avoid crashes in case it is not available in some environments.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
BLumia
approved these changes
Jun 12, 2026
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.
变更说明
使用应用主题设置窗口圆角并监听变化
修改内容
DGuiApplicationHelper::applicationTheme()获取windowRadiusDPlatformWindowHandle::setWindowRadius()设置窗口圆角DPlatformTheme::windowRadiusChanged信号实时更新测试验证
关联 Issues
🤖 Generated with Claude Code
Summary by Sourcery
Align window corner radius with the current application theme and keep it in sync with theme changes.
Enhancements: