fix(exposureslider): always set focus after slider animation#498
Conversation
Remove the isShortCut condition check so the exposure slider always gains keyboard focus after fade-in animation completes. 移除isShortCut条件判断,使曝光滑块在淡入动画结束后 始终获得键盘焦点。 Log: 修复曝光滑块动画结束后无法获得焦点的问题 PMS: BUG-350117 Influence: 修复后曝光滑块在所有触发方式下均可正确获取焦点,用户可通过方向键调整曝光值。
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已完全符合规范,无需进一步修复,保持原样即可:
connect(pGroup, &QParallelAnimationGroup::finished, this, [=](){
qDebug() << "Animation finished, handling cleanup";
m_slider->slider()->setFocus();
pGroup->deleteLater();
}); |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR ensures the exposure slider always requests keyboard focus after its fade-in animation completes, regardless of how it was triggered, and updates copyright/SPDX years accordingly. Sequence diagram for exposure slider focus after animationsequenceDiagram
actor User
participant ExposureSlider
participant QParallelAnimationGroup as AnimationGroup
participant Slider
User->>ExposureSlider: showContent(show, isShortCut)
ExposureSlider->>AnimationGroup: start()
AnimationGroup-->>ExposureSlider: finished
ExposureSlider->>Slider: setFocus()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
isShortCutparameter toshowContentis now unused; consider removing it from the function signature and call sites to avoid confusion about its purpose. - Update the inline comment
//键盘触发,需在此处理焦点and any related debug text to reflect that focus is now always set after the animation, regardless of trigger type.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `isShortCut` parameter to `showContent` is now unused; consider removing it from the function signature and call sites to avoid confusion about its purpose.
- Update the inline comment `//键盘触发,需在此处理焦点` and any related debug text to reflect that focus is now always set after the animation, regardless of trigger type.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind 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 |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Remove the isShortCut condition check so the exposure slider always gains keyboard focus after fade-in animation completes.
移除isShortCut条件判断,使曝光滑块在淡入动画结束后
始终获得键盘焦点。
Log: 修复曝光滑块动画结束后无法获得焦点的问题
PMS: BUG-350117
Influence: 修复后曝光滑块在所有触发方式下均可正确获取焦点,用户可通过方向键调整曝光值。
Summary by Sourcery
Ensure the exposure slider always receives keyboard focus after its fade-in animation completes, regardless of how it was triggered.
Bug Fixes:
Enhancements: