-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Setup: I have a JTree within a JScrollPane. FlatLaf is set up to show a full-width selection. Execution environment is JDK 21 (Adoptium, Temurin) on Windows 11 (in UTM on mac, all updates installed) with fractional scaling (125%). FlatLaf version is 3.5.4.
Issue: On selection changes, the last column of the selection rectangle sometimes remains at the old selection row. At the same time, the last pixel column is missing at the new selection row. This leads to visible artifacts when changing selection.
Observations: The clipping rectangle of the JTree is set one pixel in width too small, yet the selection rectangle is filled across the entire width. Hence, any repaint has no effect on these trailing pixels, since they are outside of the clipping rectangle.
Workaround: My current fix is to use rounded selection borders with non-zero insets and forcing JTree to never scroll horizontally while truncating text when width is too small. This avoids the selection bleeding into the border, but it is not a solution for all my JTrees.
Any update to this issue is welcome. Many thanks.