-
Notifications
You must be signed in to change notification settings - Fork 741
fix(ui): refine PromptDialogPane #3693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Limit the dialog width to avoid too long a width - Avoid accidental blank line in the information box (That blue bg box)
@@ -49,6 +49,7 @@ public class PromptDialogPane extends DialogPane { | |||
public PromptDialogPane(Builder builder) { | |||
this.builder = builder; | |||
setTitle(builder.title); | |||
setPrefWidth(560); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请避免使用魔数。可使用 org.jackhuang.hmcl.ui.Controllers#MIN_HEIGHT
的计算和 org.jackhuang.hmcl.ui.Controllers.getStage().widthProperty()
的绑定
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refines the PromptDialogPane UI to improve layout and avoid unintended blank space. Key changes include setting a fixed preferred width and updating GridPane column spans for various UI components.
@@ -49,6 +49,7 @@ public class PromptDialogPane extends DialogPane { | |||
public PromptDialogPane(Builder builder) { | |||
this.builder = builder; | |||
setTitle(builder.title); | |||
setPrefWidth(560); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The value '560' is used directly as a magic number. Consider extracting it as a named constant or configuration parameter to enhance maintainability.
Copilot uses AI. Check for mistakes.
@Glavo 为什么合并了,固定宽度真的好吗 |
Preview