设置 FontComboBox 的最小宽度 (#3424)

This commit is contained in:
Glavo 2024-11-04 18:55:04 +08:00 committed by GitHub
parent 898750d058
commit 406f36584d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,6 +35,8 @@ public class FontComboBox extends JFXComboBox<String> {
private boolean loaded = false;
public FontComboBox() {
setMinWidth(260);
styleProperty().bind(Bindings.concat("-fx-font-family: \"", valueProperty(), "\""));
setCellFactory(listView -> new JFXListCell<String>() {