mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-04-18 18:40:34 +08:00
Fix Java list display error on JDK10
如何重现: 1. 关闭当前选中版本的版本特定设置 2. 重启HMCL 3. 从主界面进入版本设置 4. 打开版本特定设置 5. 展开Java列表 问题:Java列表中的项目除了自定义项外,在外观上仍保持被禁用的状态(但是可以点击)。 原因未知。 此问题只在Java10上出现。 若在进入版本设置界面前,版本特定设置已经被打开,则不会出现此问题。 已知Java项目的styleClass、pseudoClass、disable、disabled属性均正常。 试过但没用的解决方法: 1. 删除HMCL全部CSS 2. 将Java列表默认展开 3. 使用JavaFX原生组件替代JFoenix组件 本提交中的代码由于玄学原因,可以解决此问题。
This commit is contained in:
parent
705a5659b6
commit
1b1f22b9fa
@ -24,6 +24,7 @@ import javafx.beans.NamedArg;
|
||||
import javafx.beans.property.*;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Label;
|
||||
@ -138,7 +139,7 @@ public class MultiFileItem<T> extends ComponentList {
|
||||
|
||||
public Node createChildren(String title, String subtitle, T userData) {
|
||||
BorderPane pane = new BorderPane();
|
||||
pane.setStyle("-fx-padding: 3;");
|
||||
pane.setPadding(new Insets(3));
|
||||
FXUtils.setLimitHeight(pane, 20);
|
||||
|
||||
JFXRadioButton left = new JFXRadioButton(title);
|
||||
|
Loading…
x
Reference in New Issue
Block a user