Conversation
CiiLu
commented
Mar 28, 2026
There was a problem hiding this comment.
Pull request overview
该 PR 旨在优化“下载页面/版本详情弹窗”中依赖项(Dependency)列表的展示与交互,使依赖项条目使用统一的行按钮组件(LineButton)来承载布局与点击反馈。
Changes:
- 将依赖项条目
DependencyModItem从StackPane改为继承LineButton,以复用行按钮样式/水波纹交互容器 - 调整依赖项条目的点击绑定与节点装配方式(由
RipplerContainer包裹改为直接装配到LineButton的节点体系中)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| RipplerContainer container = new RipplerContainer(pane); | ||
| FXUtils.onClicked(container, () -> { | ||
| FXUtils.onClicked(pane, () -> { |
There was a problem hiding this comment.
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.
| FXUtils.onClicked(pane, () -> { | |
| FXUtils.onClicked(this, () -> { |
| Controllers.navigate(new DownloadPage(page, addon, version, callback)); | ||
| }); | ||
| getChildren().setAll(container); | ||
| setNode(IDX_LEADING, pane); |
There was a problem hiding this comment.
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.
| setNode(IDX_LEADING, pane); | |
| setNode(IDX_TITLE, pane); |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

