From 8004d2761a66a8cc989ca5e1e402a050db6428d5 Mon Sep 17 00:00:00 2001 From: Dar Date: Wed, 23 Oct 2024 15:30:06 +0200 Subject: [PATCH] fix: respect the selection arc --- .../src/main/java/com/formdev/flatlaf/ui/FlatTreeUI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTreeUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTreeUI.java index 65146698..82a3e3e9 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTreeUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTreeUI.java @@ -577,7 +577,11 @@ public class FlatTreeUI if( alternateRowColor != null && row % 2 != 0 ) { g.setColor( alternateRowColor ); - FlatUIUtils.paintComponentBackground((Graphics2D) g, 0, bounds.y, tree.getWidth(), bounds.height, 0, 0); + + // paint respecting selection arc + final float arc = UIScale.scale( selectionArc / 2f ); + FlatUIUtils.paintSelection( (Graphics2D) g, 0, bounds.y, tree.getWidth(), bounds.height, + UIScale.scale( selectionInsets ), arc, arc, arc, arc, 0 ); } // do not paint row if editing