Skip to content

Commit

Permalink
Table: optimized position of column sort arrow (issue #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCharly committed Feb 8, 2020
1 parent 26d603d commit 686d667
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void paintIcon( Component c, Graphics2D g ) {
g.setColor( sortIconColor );
if( chevron ) {
// chevron arrow
Path2D path = FlatUIUtils.createPath( false, 1,5, 5,1, 9,5 );
Path2D path = FlatUIUtils.createPath( false, 1,4, 5,0, 9,4 );
g.setStroke( new BasicStroke( 1f ) );
g.draw( path );
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void paintIcon( Component c, Graphics2D g ) {
g.setColor( sortIconColor );
if( chevron ) {
// chevron arrow
Path2D path = FlatUIUtils.createPath( false, 1,1, 5,5, 9,1 );
Path2D path = FlatUIUtils.createPath( false, 1,0, 5,4, 9,0 );
g.setStroke( new BasicStroke( 1f ) );
g.draw( path );
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ public void paintBorder( Component c, Graphics g, int x, int y, int width, int h
int xi = x + ((width - sortIcon.getIconWidth()) / 2);
int yi = (sortIconPosition == SwingConstants.TOP)
? y + UIScale.scale( 1 )
: y + height - sortIcon.getIconHeight() - UIScale.scale( 1 );
: y + height - sortIcon.getIconHeight()
- 1 // for gap
- (int) (1 * UIScale.getUserScaleFactor()); // for bottom border
sortIcon.paintIcon( c, g, xi, yi );
}
}
Expand Down

0 comments on commit 686d667

Please sign in to comment.