fix: always recalculate position to prevent issues on window resize - #782
fix: always recalculate position to prevent issues on window resize#782kt286 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates album and artist hover delegates to refresh their mapped Y position on every hover, ensuring hover layouts remain correct after window resizing or other geometry changes. Sequence diagram for recalculating hover positionsequenceDiagram
participant User
participant AlbumGridDelegate
participant ArtistGridDelegate
participant Column
participant Parent
participant HoverAnimator
User->>AlbumGridDelegate: onHoveredChanged
AlbumGridDelegate->>Column: mapToItem(Parent, x, y)
Column-->>AlbumGridDelegate: p.y
AlbumGridDelegate->>AlbumGridDelegate: defaultY = p.y
AlbumGridDelegate->>HoverAnimator: start()
User->>ArtistGridDelegate: onHoveredChanged
ArtistGridDelegate->>Column: mapToItem(Parent, x, y)
Column-->>ArtistGridDelegate: p.y
ArtistGridDelegate->>ArtistGridDelegate: defaultY = p.y
ArtistGridDelegate->>HoverAnimator: start()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @kt286. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Remove the conditional check that only calculated the position when defaultY was negative. Now the position is recalculated every time on hover, preventing layout issues when the window size changes. fix: 每次都重新计算,防止窗口大小变化时有问题 移除仅在 defaultY 为负值时才计算位置的条件判断。 现在悬停时每次都重新计算位置,防止窗口大小变化时出现布局问题。
6c0a43e to
d4a71aa
Compare
Remove the conditional check that only calculated the position when defaultY was negative. Now the position is recalculated every time on hover, preventing layout issues when the window size changes.
fix: 每次都重新计算,防止窗口大小变化时有问题
移除仅在 defaultY 为负值时才计算位置的条件判断。
现在悬停时每次都重新计算位置,防止窗口大小变化时出现布局问题。
Summary by Sourcery
Recalculate grid item positions on every hover to prevent layout issues when the window size changes.
Bug Fixes:
Chores: