fix: adjust AlertToolTip position and animations#532
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#532
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRecalculates the AlertToolTip’s vertical offset below its target, temporarily removes opacity fades (with TODOs) to avoid background transparency issues, and keeps the slide transitions active. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes positioning and animation issues in the AlertToolTip component. The changes ensure the tooltip appears below its target element and temporarily removes opacity animations to prevent transparency rendering issues.
- Added y-position calculation to position tooltip below target element with proper spacing
- Temporarily removed opacity animations due to transparency causing tooltips to render through window background
- Maintained vertical slide animations for smooth enter/exit transitions
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#532
1. Added y-position calculation to position tooltip below target element with proper spacing 2. Removed opacity animations temporarily due to transparency causing tooltips to appear through window background 3. Maintained vertical slide animations for enter/exit transitions 4. The opacity animations are commented with TODO for future fix when transparency issue is resolved fix: 调整 AlertToolTip 位置和动画效果 1. 添加 y 位置计算,使工具提示在目标元素下方以适当间距定位 2. 暂时移除透明度动画,因为透明度会导致工具提示透过窗口背景显示 3. 保留垂直滑动动画用于进入/退出过渡 4. 透明度动画已添加 TODO 注释,待透明度问题解决后修复 pms: BUG-334771
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#532
deepin pr auto review我对这段代码进行审查,以下是改进意见: 语法逻辑
代码质量
代码性能
代码安全
改进建议
exit: Transition {
// NumberAnimation { properties: "opacity"; from: 1.0; to: 0.0 }
NumberAnimation { properties: "y"; from: control.target.height + DS.Style.control.spacing ; to: control.target.height; duration: 200 }
}
y: target ? target.height + DS.Style.control.spacing : 0
visible: target !== null
// TODO: Transparency causes tooltips to appear through the window background
// Consider adding a semi-transparent background or alternative visual effect
// to maintain visual hierarchy while fixing the transparency issue
width: Math.min(contentWidth, 300) // 或其他合适的最大宽度
MouseArea {
anchors.fill: parent
onClicked: control.close()
}这些改进将有助于提高代码的健壮性、可维护性和用户体验。 |
|
[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 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#532
fix: 调整 AlertToolTip 位置和动画效果
pms: BUG-334771
Summary by Sourcery
Adjust the AlertToolTip component to position below its target with correct spacing, temporarily remove opacity transitions to avoid transparency issues, and retain vertical slide animations for enter/exit transitions.
Enhancements: