Skip to content

修复 popup 第一次无法计算高度的问题 & 应用此方法到世界管理界面#4412

Merged
Glavo merged 3 commits intoHMCL-dev:mainfrom
pynickle:fix/issue-4287
Sep 11, 2025
Merged

修复 popup 第一次无法计算高度的问题 & 应用此方法到世界管理界面#4412
Glavo merged 3 commits intoHMCL-dev:mainfrom
pynickle:fix/issue-4287

Conversation

@pynickle
Copy link
Copy Markdown
Contributor

@pynickle pynickle commented Sep 8, 2025

Close #4287

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes the issue where popup menus cannot calculate height properly on first display and applies this solution to the world management interface. The PR moves popup position calculation logic to a shared utility method and enhances it to handle first-time popup displays.

  • Moved popup position determination logic from GameListItemSkin to FXUtils as a shared utility
  • Enhanced the method to handle first-time popup height calculation by forcing layout measurement
  • Applied the improved popup positioning to WorldListItemSkin

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
FXUtils.java Added determineOptimalPopupPosition method with enhanced height calculation for first-time popup display
GameListItemSkin.java Removed duplicate popup positioning logic and updated to use the new shared utility method
WorldListItemSkin.java Applied the improved popup positioning logic to world management interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HMCL-dev HMCL-dev deleted a comment from Copilot AI Sep 11, 2025
@pynickle pynickle requested a review from Glavo September 11, 2025 13:48
@Glavo Glavo merged commit 228a1e4 into HMCL-dev:main Sep 11, 2025
2 checks passed
@pynickle pynickle deleted the fix/issue-4287 branch September 12, 2025 05:08
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.

[Bug] 交互ui遮挡

3 participants