mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
ScrollBar: avoid continuous repainting scrollbar when moving mouse pointer over track and ScrollBar.hoverThumbWithTrack is enabled (regression in fd208a3879)
This commit is contained in:
@@ -245,7 +245,7 @@ public class FlatScrollBarUI
|
||||
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 @@ public class FlatScrollBarUI
|
||||
boolean inThumb = getThumbBounds().contains( x, y );
|
||||
if( inTrack != hoverTrack || inThumb != hoverThumb ) {
|
||||
hoverTrack = inTrack;
|
||||
hoverThumb = inThumb || (hoverThumbWithTrack && inTrack);
|
||||
hoverThumb = inThumb;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user