Skip to content
Open
Changes from all 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 @@ -351,7 +351,7 @@ static ComponentSublist createSublist(DownloadPage control, String title, List<S
}
}

private static final class DependencyModItem extends StackPane {
private static final class DependencyModItem extends LineButton {
public static final EnumMap<RemoteMod.DependencyType, String> I18N_KEY = new EnumMap<>(Lang.mapOf(
Pair.pair(RemoteMod.DependencyType.EMBEDDED, "mods.dependency.embedded"),
Pair.pair(RemoteMod.DependencyType.OPTIONAL, "mods.dependency.optional"),
Expand All @@ -367,16 +367,16 @@ private static final class DependencyModItem extends StackPane {
pane.setPadding(new Insets(0, 8, 0, 8));
pane.setAlignment(Pos.CENTER_LEFT);
TwoLineListItem content = new TwoLineListItem();
pane.setMouseTransparent(true);
HBox.setHgrow(content, Priority.ALWAYS);
var imageView = new ImageContainer(40);
pane.getChildren().setAll(imageView, content);

RipplerContainer container = new RipplerContainer(pane);
FXUtils.onClicked(container, () -> {
FXUtils.setLimitHeight(this, 60);
FXUtils.onClicked(pane, () -> {
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pane is set to mouseTransparent(true) but the click handler is registered on pane via FXUtils.onClicked(pane, ...). A mouse-transparent node will never receive mouse events, so this handler won't fire and dependency items become non-clickable. Register the handler on the DependencyModItem/LineButton itself (e.g., setOnAction(...) or FXUtils.onClicked(this, ...)) and keep inner content mouse-transparent, or remove pane.setMouseTransparent(true) if you really want pane to handle the click.

Suggested change
FXUtils.onClicked(pane, () -> {
FXUtils.onClicked(this, () -> {

Copilot uses AI. Check for mistakes.
fireEvent(new DialogCloseEvent());
Controllers.navigate(new DownloadPage(page, addon, version, callback));
});
getChildren().setAll(container);
setNode(IDX_LEADING, pane);
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DependencyModItem extends LineButton, but the custom pane is inserted at IDX_LEADING. LineComponent already has an internal title container at IDX_TITLE with HBox.setHgrow(..., ALWAYS), so keeping it alongside your pane can leave a large empty area and prevent your TwoLineListItem from expanding to full width. Consider replacing the title node instead (use setNode(IDX_TITLE, pane) or setTitle/setSubtitle APIs) so the dependency row lays out correctly.

Suggested change
setNode(IDX_LEADING, pane);
setNode(IDX_TITLE, pane);

Copilot uses AI. Check for mistakes.

if (addon != RemoteMod.BROKEN) {
ModTranslations.Mod mod = ModTranslations.getTranslationsByRepositoryType(page.repository.getType()).getModByCurseForgeId(addon.getSlug());
Expand Down Expand Up @@ -493,6 +493,7 @@ public ModVersion(RemoteMod mod, RemoteMod.Version version, DownloadPage selfPag
loadDependencies(version, selfPage, spinnerPane, dependenciesList);
spinnerPane.setOnFailedAction(e -> loadDependencies(version, selfPage, spinnerPane, dependenciesList));

scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.setContent(dependenciesList);
scrollPane.setFitToWidth(true);
scrollPane.setFitToHeight(true);
Expand Down