Skip to content

feat: add animation for menu's selected backgroud - #230

Merged
zccrs merged 1 commit into
linuxdeepin:dev/animationfrom
zccrs:master
Jul 9, 2024
Merged

feat: add animation for menu's selected backgroud#230
zccrs merged 1 commit into
linuxdeepin:dev/animationfrom
zccrs:master

Conversation

@zccrs

@zccrs zccrs commented Jul 9, 2024

Copy link
Copy Markdown
Member

Add a ChameleonAnimation class for the geometry translate animation.

Add a ChameleonAnimation class for the geometry translate animation.
@zccrs
zccrs requested a review from FeiWang1119 July 9, 2024 02:54
deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Jul 9, 2024
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#230
@deepin-ci-robot

Copy link
Copy Markdown
Contributor

deepin pr auto review

关键摘要:

  • ChameleonMovementAnimation类中,setTargetRect方法可能会导致动画无限循环地更新m_currentRectm_targetRect。如果m_targetRect在动画过程中没有变化,那么m_currentRect将一直等于m_lastTargetRect,从而导致动画无法结束。
  • drawMenuItemBackground方法中,使用do-while循环来尝试绘制动画,可能会导致无限循环,因为animation变量在每次循环中都会被重新创建。
  • drawMenuItem方法中,使用useHighlightedText变量来决定是否使用高亮文本,但在painter->setOpacity(1.0 - animation->progress());这行代码中,animation的类型没有明确指定,可能会导致编译错误。
  • ChameleonMovementAnimation类中的progress方法计算当前动画循环的时间,然后除以动画的持续时间来得到动画的进度。这种计算方式可能会导致在动画接近结束时出现精度问题。

是否建议立即修改:

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: FeiWang1119, zccrs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zccrs
zccrs merged commit cc748a7 into linuxdeepin:dev/animation Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants