FlatLaf: fix location of drag-and-drop insert indicator lines #6142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing drag-and-drop in tree, tree-table or palette, then the insert indicator lines are painted at wrong location in NB 18 on Windows 10/11 with FlatLaf.
(red arrow indicates the correct location where the dnd lines should be painted)
The reason for this problem is that since FlatLaf 3.1 (since NB 18), glass panes are not located at location
0,0
in root pane (if FlatLaf window decorations are enabled). But NetBeans code converts locations to root pane coordinates and uses them to paint on glass pane, which is not located at0,0
in root pane.This PR fixes the problem for TreeView, OutlineView (e.g. used in "Search Result" view) and palette.
I've searched the NB source code for
getRootPane
,convertPoint
andconvertRectangle
and checked results whether coordinate conversion is used for glass panes. Found only the 3 files fixed in this PR.Fixes #6134