fix: tray tooltip position incorrect for stashed area on treeland#1623
Open
BLumia wants to merge 1 commit into
Open
fix: tray tooltip position incorrect for stashed area on treeland#1623BLumia wants to merge 1 commit into
BLumia wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
18202781743
reviewed
Jun 8, 2026
修正 treeland 会话下,向上收起的托盘区域中的图标 tooltip 位置不正确. PMS: BUG-339313 Log:
deepin pr auto review我来对这段代码进行审查,从语法逻辑、代码质量、性能和安全性几个方面进行分析: 语法逻辑
代码质量
性能
安全性
改进建议
// 简化信号处理
onUpdateGeometryFinished: {
if (!menu.shellSurface)
return
// 其他逻辑
}
// 添加空值检查
toolTip.shellSurface = popupSurface || null
// 考虑使用缓存机制优化位置计算
property real cachedX: 0
property real cachedY: 0
onPopupSurfaceChanged: {
if (popupSurface) {
cachedX = Panel.popupWindow.xOffset + popupSurface.x - toolTip.width / 2
cachedY = Panel.popupWindow.yOffset + popupSurface.y - toolTip.height - toolTipVOffset
}
}
// 添加注释说明位置计算逻辑
// 计算工具提示位置,考虑弹出窗口偏移和表面位置
toolTip.toolTipX = Qt.binding(function () {
return Panel.popupWindow.xOffset + toolTip.shellSurface.x - toolTip.width / 2
})总体而言,这次修改提高了代码的内聚性和可维护性,但在性能优化和错误处理方面还有改进空间。建议在实际使用中关注这些潜在问题,并根据实际运行情况进行调整。 |
18202781743
approved these changes
Jun 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia 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 |
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.
修正 treeland 会话下,向上收起的托盘区域中的图标 tooltip 位置不正确.
PMS: BUG-339313