Skip to content

Fix: Fix the alignment issue in the game download list.#6211

Merged
Glavo merged 1 commit into
HMCL-dev:mainfrom
KSSJW-Contribution:game-download-list-fix
Jun 25, 2026
Merged

Fix: Fix the alignment issue in the game download list.#6211
Glavo merged 1 commit into
HMCL-dev:mainfrom
KSSJW-Contribution:game-download-list-fix

Conversation

@KSSJW

@KSSJW KSSJW commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

修复 VersionsPage 对齐问题

缘由

涉及的 Issue

#6191

更改

  • 补充 VersionsPageTwoLineListItem的对齐。

实况

字体:Tahoma

修复前 修复后
1 2

@KSSJW

KSSJW commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds an alignment setting to twoLineListItem in the download versions page. The reviewer suggests using Pos.CENTER_LEFT instead of Pos.CENTER to keep the list item's text left-aligned horizontally while centering it vertically.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


HBox hbox = new HBox(16);
HBox.setHgrow(twoLineListItem, Priority.ALWAYS);
twoLineListItem.setAlignment(Pos.CENTER);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

twoLineListItem(它是一个 VBox)的对齐方式设置为 Pos.CENTER 会在子组件未填满宽度时,将它们在水平和垂直方向上都居中。由于这是一个列表项,文本通常应该保持左对齐,因此使用 Pos.CENTER_LEFT 会更安全且在语义上更准确。这可以确保文本在水平方向上保持左对齐,同时在垂直方向上居中。

Suggested change
twoLineListItem.setAlignment(Pos.CENTER);
twoLineListItem.setAlignment(Pos.CENTER_LEFT);

@KSSJW

KSSJW commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

只要CENTER应该可以了吧(

@Glavo
Glavo merged commit 1f8ba73 into HMCL-dev:main Jun 25, 2026
2 checks passed
@KSSJW
KSSJW deleted the game-download-list-fix branch June 25, 2026 13:46
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