fix: adjust notification center width calculation#1251
Conversation
Changed width calculation from hardcoded values to use NotifyStyle.contentItem.width for consistent styling Added proper scrollbar width calculation in NotifyCenter to account for scrollbar presence Updated main window width calculation to include proper padding handling Fixed anchor margins and right constraints to ensure proper layout with dynamic width Added contentPadding property for better maintainability of spacing values Log: Fixed notification center layout issues with dynamic width calculation Influence: 1. Test notification center display with different content widths 2. Verify scrollbar appears correctly and doesn't cause layout issues 3. Check that all notification items maintain consistent width 4. Test window resizing behavior and content alignment 5. Verify margins and padding are applied correctly on all sides fix: 调整通知中心宽度计算方式 将硬编码的宽度值改为使用 NotifyStyle.contentItem.width 以确保样式一致性 在 NotifyCenter 中添加了正确的滚动条宽度计算以考虑滚动条的存在 更新了主窗口宽度计算以包含正确的内边距处理 修复了锚点边距和右侧约束以确保动态宽度下的正确布局 添加了 contentPadding 属性以便更好地维护间距值 Log: 修复了通知中心动态宽度计算导致的布局问题 Influence: 1. 测试不同内容宽度下通知中心的显示效果 2. 验证滚动条正确显示且不会导致布局问题 3. 检查所有通知项是否保持一致的宽度 4. 测试窗口调整大小行为和内容对齐 5. 验证边距和内边距在所有边上是否正确应用 PMS: BUG-325871
There was a problem hiding this comment.
Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review我对这个git diff进行了审查,以下是我的分析和改进建议: 1. 代码逻辑分析主要变更集中在通知中心的宽度和布局调整上:
2. 语法改进
3. 代码质量改进
4. 性能优化
5. 安全性考虑
6. 具体改进建议
总的来说,这次修改提高了代码的可维护性和灵活性,但还有一些细节可以进一步优化,特别是在处理滚动条和响应式设计方面。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Changed width calculation from hardcoded values to use
NotifyStyle.contentItem.width for consistent styling
Added proper scrollbar width calculation in NotifyCenter to account for
scrollbar presence
Updated main window width calculation to include proper padding handling
Fixed anchor margins and right constraints to ensure proper layout with
dynamic width
Added contentPadding property for better maintainability of spacing
values
Log: Fixed notification center layout issues with dynamic width
calculation
Influence:
fix: 调整通知中心宽度计算方式
将硬编码的宽度值改为使用 NotifyStyle.contentItem.width 以确保样式一致性
在 NotifyCenter 中添加了正确的滚动条宽度计算以考虑滚动条的存在
更新了主窗口宽度计算以包含正确的内边距处理
修复了锚点边距和右侧约束以确保动态宽度下的正确布局
添加了 contentPadding 属性以便更好地维护间距值
Log: 修复了通知中心动态宽度计算导致的布局问题
Influence:
PMS: BUG-325871