Fix: FontComboBox closes unexpectedly#6238
Conversation
|
/gemini review |
3gf8jv4dv
left a comment
There was a problem hiding this comment.
非常好 PR,虽然 HMCL 的字体一言难尽
There was a problem hiding this comment.
Code Review
This pull request updates FontComboBox.java to manually handle hiding the popup when an item is clicked, by listening to skin changes and adding a mouse click listener to the underlying ListView. The review feedback correctly identifies a bug where clicking on child nodes (like text) inside a ListCell will prevent the popup from closing, and provides a robust solution to traverse the parent hierarchy to find the clicked cell.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates FontComboBox.java to customize the behavior of its skin. Specifically, it adds a listener to skinProperty() to disable hideOnClick on ComboBoxListViewSkin and manually handle hiding the combo box when a non-empty list cell is clicked. The reviewer provided valuable feedback to improve robustness: using pattern matching with instanceof to safely cast the popup content and avoid potential exceptions, and using addEventHandler instead of setOnMouseClicked to prevent overwriting existing event handlers.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
修复
FontComboBox在预期外关闭的问题问题
更改
实况
更改前
1.mp4
更改后
2.mp4