ScrollBar:

- added `ScrollBar.minimumButtonSize` to specify minimum scroll arrow button size
- center and scale arrows in scroll up/down buttons

(issue #493)
This commit is contained in:
Karl Tauber
2022-03-13 10:50:49 +01:00
parent ab58101ce3
commit 99f7b9ad84
15 changed files with 74 additions and 19 deletions

View File

@@ -217,8 +217,8 @@ public class FlatTaskPaneUI
Graphics2D g2 = (Graphics2D) g;
// scale chevron size
float cw = scale( 6f );
float ch = scale( 3f );
float cw = scale( 7f );
float ch = scale( 3.5f );
// create arrow shape
int direction = group.isCollapsed() ? SwingConstants.SOUTH : SwingConstants.NORTH;
@@ -237,9 +237,9 @@ public class FlatTaskPaneUI
// paint
g2.translate( cx, cy );
g2.draw( arrowShape );
FlatUIUtils.drawShapePure( g2, arrowShape );
g2.translate( 0, offset );
g2.draw( arrowShape );
FlatUIUtils.drawShapePure( g2, arrowShape );
g2.translate( -cx, -(cy + offset) );
}