Skip to content

fix: reset title bar animationShow on fullscreen exit (PMS #381383) - #433

Closed
wyu71 wants to merge 1 commit into
masterfrom
fix/381383-titlebar-animation-reset
Closed

wyu71 wants to merge 1 commit into
masterfrom
fix/381383-titlebar-animation-reset

Conversation

@wyu71

@wyu71 wyu71 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

问题

PMS #381383: 看图全屏删除图片后回到首页无法退出看图窗口

全屏状态下依次删除图片后回到看图首页,标题栏虽 visible=true 但 Y 坐标停在 -titleHeight(屏幕外不可见),关闭按钮和标题栏菜单均不可达,用户无法退出看图窗口。

根因

switchOpenImage()(MainStack.qml)在退出全屏时重置了 showFullScreen、window.opacity、fullScreenAnimating,但遗漏了 titleRect.animationShow 的重置。

全屏期间 animationAll()(FullImageView.qml)将 titleRect.animationShow 设为 false,标题栏 Y 坐标滑至 -titleHeight。退出全屏后 FullImageView 被销毁,animationAll() 不复存在,animationShow 永远不会被重置为 true。

commit 89b6fb0(PMS BUG-378387)的修复遗漏了此重置点。

修复方案

在 ViewTopTitle.qml 增加 onVisibleChanged 处理器,当标题栏 visible 变为 true(即退出全屏)时,将 animationShow 重置为 true,触发 onAnimationShowChanged 将 y 设为 0,标题栏滑回正确位置。

覆盖所有退出全屏场景,修改最小化。

关联

  • PMS: #381383
  • 关联修复: commit 89b6fb0 (PMS BUG-378387)

Summary by Sourcery

Bug Fixes:

  • Restore the title bar position when leaving fullscreen so it remains visible and the image viewer can be closed.

When exiting fullscreen (e.g. after deleting all images), titleRect.animationShow
was not reset to true, leaving the title bar at y=-titleHeight (off-screen).
Add onVisibleChanged handler to ViewTopTitle.qml so animationShow is reset
whenever the title bar becomes visible (i.e. when exiting fullscreen).
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wyu71

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

@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Fixes the fullscreen-exit deadlock by resetting the title bar’s hidden animation state when it becomes visible, allowing the title bar controls to reappear and the image viewer to be closed.

Sequence diagram for resetting the title bar after fullscreen exit

sequenceDiagram
    participant MainStack
    participant ViewTopTitle
    participant TitleBarControls

    MainStack->>ViewTopTitle: visible = true
    ViewTopTitle->>ViewTopTitle: onVisibleChanged
    ViewTopTitle->>ViewTopTitle: animationShow = true
    ViewTopTitle->>ViewTopTitle: onAnimationShowChanged
    ViewTopTitle->>TitleBarControls: y = 0
    TitleBarControls-->>MainStack: Close and menu controls reachable
Loading

File-Level Changes

Change Details Files
Reset the title bar’s animation state whenever it becomes visible, ensuring it returns to its on-screen position after fullscreen exit.
  • Add a visibility-change handler that sets animationShow to true when the title bar is shown.
  • Rely on the existing animation-state change handler to restore the title bar’s Y coordinate to 0.
  • Cover fullscreen exit paths without modifying fullscreen transition logic.
src/qml/ViewTopTitle.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@wyu71

wyu71 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

关闭此 PR,因头分支位于上游仓库(违反跨仓库 PR 规范)。将从 fork (wyu71) 重新提交修复方案更新版。

@wyu71 wyu71 closed this Oct 30, 2026
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.

2 participants