[Bugfix] 修复右上角按钮和对话框图层相对位置错误的问题#6194
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for a custom overlay pane in JFXDialog, allowing dialogs to be rendered on a separate overlay container. The feedback highlights critical areas for improvement, including adding null checks to the overlayPaneProperty listener to prevent NullPointerExceptions, ensuring that the dialog content and overlay pane are properly made visible when showing a dialog without animations, and defaulting the overlay pane to the dialog itself if set to null to avoid errors elsewhere in the class.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for a custom overlay pane in JFXDialog. It adds a new constructor accepting an overlayPane and updates visibility, opacity, and transition animations to target the contentHolder and the custom overlayPane instead of the dialog itself. Decorator and DecoratorSkin are updated to manage this overlay pane, and DialogUtils is adjusted to pass it during dialog creation. Feedback on these changes suggests adding defensive null checks in the overlayPaneProperty listener of JFXDialog to prevent potential NullPointerExceptions, and directly utilizing the new 5-parameter constructor in DialogUtils to avoid redundant layout configurations.
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 introduces support for custom overlay panes in JFXDialog by adding an overlayPane property and updating the dialog display and animation logic to target the overlay pane and content holder separately. It also updates DialogUtils and Decorator to support this new overlay pane. The review feedback suggests removing commented-out dead code in JFXDialog.java and restoring a removed show method overload in DialogUtils.java to prevent breaking backward compatibility.
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.
| //this.setVisible(false); | ||
| this.getStyleClass().add(DEFAULT_STYLE_CLASS); |
| public static void show(StackPane container, Node content) { | ||
| show(container, content, null); | ||
| show(container, content, null, null); | ||
| } |
There was a problem hiding this comment.
在此处删除了原有的 show(StackPane container, Node content, @Nullable Consumer<JFXDialog> onDialogCreated) 方法,这可能会导致代码库中其他调用该方法的地方出现编译错误。建议保留该方法作为重载,以确保向后兼容性。
public static void show(StackPane container, Node content) {
show(container, content, null, null);
}
public static void show(StackPane container, Node content, @Nullable Consumer<JFXDialog> onDialogCreated) {
show(container, content, null, onDialogCreated);
}|
CC @Glavo can merge |
现在对话框在右上角三个按钮之上,而阴影背景在三个按钮之下,所以遮挡关系是正确的且能正常点击按钮
Fixes #5796 Fixes #5122 Fixes #6192