diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index 0b43498fa..46fb4b6ba 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -245,7 +245,7 @@ protected void paintThumb( Graphics g, JComponent c, Rectangle thumbBounds ) { if( thumbBounds.isEmpty() || !scrollbar.isEnabled() ) return; - g.setColor( getThumbColor( c, hoverThumb ) ); + g.setColor( getThumbColor( c, hoverThumb || (hoverThumbWithTrack && hoverTrack) ) ); paintTrackOrThumb( g, c, thumbBounds, thumbInsets, thumbArc ); } @@ -336,7 +336,7 @@ private void update( int x, int y ) { boolean inThumb = getThumbBounds().contains( x, y ); if( inTrack != hoverTrack || inThumb != hoverThumb ) { hoverTrack = inTrack; - hoverThumb = inThumb || (hoverThumbWithTrack && inTrack); + hoverThumb = inThumb; repaint(); } }