fix: adjust notification center scrollbar position#1252
Merged
Conversation
Fixed scrollbar positioning issue in notification center by: 1. Removed unused DS style import that was causing conflicts 2. Added right anchor and rightMargin to properly position the content area 3. Removed explicit width calculation that was causing misalignment 4. Maintained height calculation based on maxViewHeight and viewHeight The scrollbar was incorrectly positioned due to hardcoded width calculations that didn't account for proper layout constraints. By using anchor-based layout with appropriate margins instead of explicit width calculations, the scrollbar now positions correctly within the notification center panel. Log: Fixed notification center scrollbar positioning issue Influence: 1. Open notification center and verify scrollbar appears correctly positioned 2. Test scrolling functionality with multiple notifications 3. Check that scrollbar visibility toggles properly based on content height 4. Verify layout consistency across different screen sizes 5. Test notification center opening/closing animations fix: 调整通知中心滚动条位置 修复通知中心滚动条定位问题: 1. 移除导致冲突的未使用 DS 样式导入 2. 添加右侧锚点和右边距以正确定位内容区域 3. 移除导致错位的显式宽度计算 4. 保持基于最大视图高度和视图高度的高度计算 由于硬编码的宽度计算未考虑正确的布局约束,导致滚动条定位不正确。通过使用 基于锚点的布局和适当的边距代替显式宽度计算,滚动条现在可以在通知中心面板 中正确定位。 Log: 修复通知中心滚动条定位问题 Influence: 1. 打开通知中心并验证滚动条正确定位 2. 使用多个通知测试滚动功能 3. 检查滚动条可见性是否根据内容高度正确切换 4. 验证不同屏幕尺寸下的布局一致性 5. 测试通知中心打开/关闭动画 PMS: BUG-283695
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我对这段代码审查如下:
改进建议:
改进后的代码可能如下: anchors {
left: parent.left
top: header.bottom
right: parent.right
rightMargin: NotifyStyle.scrollBarPadding // 考虑提取为常量并添加注释
topMargin: NotifyStyle.contentMarginTop // 建议提取为样式常量
bottom: parent.bottom
}这些改进主要是为了提高代码的可维护性和可读性,同时保持原有的功能完整性。 |
mhduiy
approved these changes
Sep 18, 2025
|
[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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
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.
Fixed scrollbar positioning issue in notification center by:
area
The scrollbar was incorrectly positioned due to hardcoded width
calculations that didn't account for proper layout constraints. By
using anchor-based layout with appropriate margins instead of explicit
width calculations, the scrollbar now positions correctly within the
notification center panel.
Log: Fixed notification center scrollbar positioning issue
Influence:
positioned
height
fix: 调整通知中心滚动条位置
修复通知中心滚动条定位问题:
由于硬编码的宽度计算未考虑正确的布局约束,导致滚动条定位不正确。通过使用
基于锚点的布局和适当的边距代替显式宽度计算,滚动条现在可以在通知中心面板
中正确定位。
Log: 修复通知中心滚动条定位问题
Influence:
PMS: BUG-283695