Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import org.jackhuang.hmcl.ui.FXUtils;

Expand Down Expand Up @@ -167,16 +168,17 @@ public ObservableList<Label> getTags() {
var tagsBox = new HBox(8);
tagsBox.getStyleClass().add("tags");
tagsBox.setAlignment(Pos.CENTER_LEFT);
tagsBox.setMinWidth(0);
HBox.setHgrow(tagsBox, Priority.ALWAYS);
tagsBox.setMinWidth(Region.USE_PREF_SIZE);
Comment thread
ZZZank marked this conversation as resolved.
Outdated
HBox.setHgrow(tagsBox, Priority.NEVER);
Bindings.bindContent(tagsBox.getChildren(), tags);
var isNotEmpty = Bindings.isNotEmpty(tags);
tagsBox.managedProperty().bind(isNotEmpty);
tagsBox.visibleProperty().bind(isNotEmpty);

FXUtils.setOverflowHidden(tagsBox);

lblTitle.setMinWidth(Label.USE_PREF_SIZE);
HBox.setHgrow(lblTitle, Priority.ALWAYS);
lblTitle.setMinWidth(0);
firstLine.getChildren().setAll(lblTitle, tagsBox);
Comment thread
ZZZank marked this conversation as resolved.
}
return tags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ final class ModInfoDialog extends JFXDialogLayout {
modInfo.loadIcon(imageContainer, null);

TwoLineListItem title = new TwoLineListItem();
title.getTitleLabel().setWrapText(true);
if (modInfo.getModTranslations() != null && I18n.isUseChinese())
title.setTitle(modInfo.getModTranslations().getDisplayName());
else
Expand Down Expand Up @@ -544,6 +545,7 @@ final class ModInfoListCell extends MDListCell<ModInfoObject> {
container.setAlignment(Pos.CENTER_LEFT);
HBox.setHgrow(content, Priority.ALWAYS);
content.setMouseTransparent(true);
content.getTitleLabel().setTextOverrun(OverrunStyle.ELLIPSIS);
setSelectable();

imageContainer.setImage(VersionIconType.COMMAND.getIcon());
Expand Down
Loading