Skip to content

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

Merged
Whale107 merged 1 commit into
linuxdeepin:dev/animationfrom
Whale107:dev/animation
Aug 12, 2024
Merged

chore: 新增搜索框图标移动动画#590
Whale107 merged 1 commit into
linuxdeepin:dev/animationfrom
Whale107:dev/animation

Conversation

@Whale107

@Whale107 Whale107 commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

新增搜索框图标移动动画

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

deepin-bot Bot commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

Doc Check bot
🟢 Document Coverage Check Passed!

@Whale107
Whale107 requested a review from kegechen August 2, 2024 08:40
Comment thread src/widgets/dsearchedit.cpp Outdated
Comment thread src/widgets/dsearchedit.cpp Outdated
Comment thread src/widgets/dsearchedit.cpp Outdated
Comment thread src/widgets/dsearchedit.cpp Outdated
Comment thread src/widgets/dsearchedit.cpp Outdated
Comment thread src/widgets/private/dsearchedit_p.h Outdated
@Whale107
Whale107 requested a review from FeiWang1119 August 5, 2024 09:23
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
Copy Markdown
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
Copy Markdown
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.

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

@Whale107
Whale107 merged commit e272211 into linuxdeepin:dev/animation Aug 12, 2024
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