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

fix: improve splitter animation handling #2487

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

Lighto-Ku
Copy link
Contributor

  1. Add handle enable/disable during splitter animation to prevent user interference
  2. Add animation state tracking in titlebar to avoid unnecessary UI updates
  3. Optimize placeholder width updates to prevent redundant resizing
  4. Add animation start/end value tracking for better state management

Log: fix animation issue
Bug: https://pms.uniontech.com/bug-view-292639.html

1. Add handle enable/disable during splitter animation to prevent user interference
2. Add animation state tracking in titlebar to avoid unnecessary UI updates
3. Optimize placeholder width updates to prevent redundant resizing
4. Add animation start/end value tracking for better state management

Log: fix animation issue
Bug: https://pms.uniontech.com/bug-view-292639.html
1. Set minimum height for FileView to ensure basic display space
2. Adjust layout strategy in WorkspaceWidget:
   - Change viewStackLayout stretch factor from 1 to 0 to prevent auto-expansion
   - Add stretch factor 1 and top alignment for top widget to allow it to occupy available vertical space

This fixes layout issues with the workspace widget and file view components.

Log: fix ui issue
Bug: https://pms.uniontech.com/bug-view-285601.html
- Add screen boundary checks when showing the widget
- Adjust widget position if it would appear outside screen
- Improve user experience by keeping widget fully visible

Log: fix ui issue
Bug: https://pms.uniontech.com/bug-view-286089.html
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. filemanagerwindow.cpp文件中,connectAnimationSignals函数中新增的代码块没有注释说明其目的和逻辑,建议添加注释以便其他开发者理解。

  2. titlebar.cpp文件中,新增的信号连接aboutToPlaySplitterAnimation没有对应的槽函数实现,可能会导致编译错误或运行时错误。

  3. titlebarwidget.cpp文件中,handleSplitterAnimation函数中新增的判断逻辑可能会导致placeholder的宽度设置不正确,应该确认position的值是否总是有效的。

  4. titlebarwidget.cpp文件中,handleAboutToPlaySplitterAnim函数中新增的成员变量splitterStartValuesplitterEndValue没有在类声明中初始化,可能会导致未定义行为。

  5. titlebarwidget.cpp文件中,eventFilter函数中新增的逻辑可能会导致事件过滤器的行为不符合预期,应该确认事件过滤器的具体需求。

  6. viewoptionswidget.cpp文件中,exec函数中新增的代码块用于计算显示位置,但是没有考虑到多屏幕环境下的情况,可能会导致显示位置不正确。

  7. fileview.cpp文件中,FileView构造函数中新增的setMinimumHeight调用可能会影响布局,应该确认是否有必要设置最小高度。

  8. workspacewidget.cpp文件中,initViewLayout函数中新增的widgetLayout->addLayout(viewStackLayout, 0);调用可能会影响布局,应该确认是否有必要设置布局权重为0。

以上意见仅供参考,具体实现可能需要根据项目需求和上下文进行调整。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs, Lighto-Ku

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

@Lighto-Ku
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 4a48cb5 into linuxdeepin:master Dec 13, 2024
20 checks passed
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