Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 新增搜索框图标移动动画 #590

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

Whale107
Copy link
Contributor

@Whale107 Whale107 commented Aug 2, 2024

新增搜索框图标移动动画

Log:

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 2, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Aug 2, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

@Whale107 Whale107 requested a review from kegechen August 2, 2024 08:40
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 6, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 6, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 6, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 6, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
新增搜索框图标移动动画

Log:
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Aug 7, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#590
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • DSearchEditPrivate构造函数中,animation对象被重复创建,应该在类的生命周期中只创建一次。
  • animation对象在_q_toEditMode函数中被重复使用,应该将其声明为类的成员变量以避免重复创建。
  • _q_toEditMode函数中的动画方向切换逻辑可能存在问题,应该检查animation对象的当前方向是否正确。
  • _q_toEditMode函数中的if (!q->lineEdit()->text().isEmpty())条件检查可能是多余的,因为当文本不为空时,其他代码已经处理了显示和隐藏行为。
  • _q_toEditMode函数中的iconWidget->setVisible(true);调用可能不是必要的,因为iconWidget在构造函数中已经设置为可见。
  • _q_toEditMode函数中的q->lineEdit()->setTextMargins(marginsInAnimation);调用可能不是必要的,因为textMargins已经在动画的设置中考虑了。
  • _q_onVoiceActionTrigger函数中的animation->setDirection(QPropertyAnimation::Direction::Forward);调用可能导致动画方向错误,应该检查animation对象的当前状态。
  • _q_onVoiceActionTrigger函数中的iconWidget->move(QPoint(q->lineEdit()->geometry().center().x() - iconWidget->width() / 2, iconWidget->pos().y()));调用可能导致动画目标对象位置错误,应该检查animation对象的当前状态。

是否建议立即修改:

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@Whale107 Whale107 merged commit e272211 into linuxdeepin:dev/animation Aug 12, 2024
20 of 21 checks passed
Whale107 added a commit to Whale107/dtkwidget that referenced this pull request Sep 23, 2024
新增搜索框图标移动动画

Log:
deepin-bot bot pushed a commit that referenced this pull request Sep 23, 2024
新增搜索框图标移动动画

Log:
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