Skip to content

fix: 任务窗口速度与取消未对齐#6140

Open
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:emmmmmmm
Open

fix: 任务窗口速度与取消未对齐#6140
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:emmmmmmm

Conversation

@CiiLu
Copy link
Copy Markdown
Contributor

@CiiLu CiiLu commented May 24, 2026

image image

@CiiLu CiiLu changed the title fix: 人物窗口速度与取消未对齐 fix: 任务窗口速度与取消未对齐 May 24, 2026
@Wulian233
Copy link
Copy Markdown
Contributor

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Glavo
Copy link
Copy Markdown
Member

Glavo commented May 27, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@Glavo
Copy link
Copy Markdown
Member

Glavo commented May 27, 2026

/gemini review

Copy link
Copy Markdown
Contributor

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

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 refactors the layout of the TaskExecutorDialogPane by replacing a BorderPane with an HBox at the bottom of the dialog, cleaning up imports, and using a spacer region to push the cancel button to the right. The review feedback suggests avoiding wildcard imports for javafx.scene.layout to comply with the Google Java Style Guide, and recommends binding the visibility and managed properties of lblProgress to its text content to prevent layout issues when the progress label is empty.

Comment on lines 77 to +78
lblProgress = new Label();
bottom.setLeft(lblProgress);

Region spacer = new Region();
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

lblProgress 的文本为空时(例如在任务刚开始或非下载任务中),由于它默认是可见且参与布局的,HBox 仍会为其保留位置并应用 spacing(8)。这会导致左侧出现额外的 8 像素间距,从而破坏整体的对齐效果。

建议将 lblProgressvisiblemanaged 属性与其文本是否为空进行绑定。这样当文本为空时,它不会占用任何布局空间,也不会产生多余的间距。

Suggested change
lblProgress = new Label();
bottom.setLeft(lblProgress);
Region spacer = new Region();
lblProgress = new Label();
lblProgress.visibleProperty().bind(lblProgress.textProperty().isNotEmpty());
lblProgress.managedProperty().bind(lblProgress.visibleProperty());
Region spacer = new Region();

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.

3 participants