Skip to content

Commit 02e9d80

Browse files
Fix #4938: 修复 OfflineAccountSkinPane 页面提示栏和按钮重叠的问题 (#5117)
1 parent 8923be5 commit 02e9d80

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

HMCL/src/main/java/org/jackhuang/hmcl/ui/account/OfflineAccountSkinPane.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ public OfflineAccountSkinPane(OfflineAccount account) {
159159

160160
FXUtils.onChangeAndOperate(skinItem.selectedDataProperty(), selectedData -> {
161161
GridPane gridPane = new GridPane();
162-
gridPane.setPadding(new Insets(0, 0, 0, 10));
162+
// Increase bottom padding to prevent the prompt from overlapping with the dialog action area
163+
164+
gridPane.setPadding(new Insets(0, 0, 45, 10));
163165
gridPane.setHgap(16);
164166
gridPane.setVgap(8);
165167
gridPane.getColumnConstraints().setAll(new ColumnConstraints(), FXUtils.getColumnHgrowing());
@@ -172,9 +174,15 @@ public OfflineAccountSkinPane(OfflineAccount account) {
172174
case LITTLE_SKIN:
173175
HintPane hint = new HintPane(MessageDialogPane.MessageType.INFO);
174176
hint.setText(i18n("account.skin.type.little_skin.hint"));
177+
// Allow the tooltip to span two columns and expand horizontally to avoid overlapping with the dialog action area/top-right help button
178+
GridPane.setColumnSpan(hint, 2);
179+
GridPane.setHgrow(hint, Priority.ALWAYS);
180+
hint.setMaxWidth(Double.MAX_VALUE);
181+
175182
gridPane.addRow(0, hint);
176183
break;
177184
case LOCAL_FILE:
185+
gridPane.setPadding(new Insets(0, 0, 0, 10));
178186
gridPane.addRow(0, new Label(i18n("account.skin.model")), modelCombobox);
179187
gridPane.addRow(1, new Label(i18n("account.skin")), skinSelector);
180188
gridPane.addRow(2, new Label(i18n("account.cape")), capeSelector);

0 commit comments

Comments
 (0)