diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java index 4e72c799a..27d22392d 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java @@ -18,126 +18,166 @@ package org.jackhuang.hmcl.ui.construct; import javafx.beans.binding.Bindings; -import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; +import javafx.beans.property.StringPropertyBase; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import javafx.geometry.Insets; -import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; -import org.jackhuang.hmcl.ui.FXUtils; -import org.jackhuang.hmcl.util.AggregatedObservableList; public class TwoLineListItem extends VBox { private static final String DEFAULT_STYLE_CLASS = "two-line-list-item"; - private static Label createTagLabel(String tag) { - Label tagLabel = new Label(); - tagLabel.setText(tag); - HBox.setMargin(tagLabel, new Insets(0, 8, 0, 0)); - return tagLabel; - } + private final HBox firstLine; + private HBox secondLine; - private final StringProperty title = new SimpleStringProperty(this, "title"); - private final ObservableList