Skip to content

Commit

Permalink
Fix #404: Down arrow key leaves garbage when rendering on OS X in som…
Browse files Browse the repository at this point in the history
…e situations
  • Loading branch information
bobbylight committed Dec 4, 2021
1 parent 7a3c309 commit 22e160a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,16 @@ public void paint(Graphics g) {
// Draw a vertical line.
default:
case VERTICAL_LINE_STYLE:
g.drawLine(r.x,r.y, r.x,r.y+r.height);
int lineY = r.y + 1;
g.drawLine(r.x,lineY, r.x,lineY+r.height);
break;

// A thicker vertical line.
case THICK_VERTICAL_LINE_STYLE:
g.drawLine(r.x,r.y, r.x,r.y+r.height);
lineY = r.y + 1;
g.drawLine(r.x,lineY, r.x,lineY+r.height);
r.x++;
g.drawLine(r.x,r.y, r.x,r.y+r.height);
g.drawLine(r.x,lineY, r.x,lineY+r.height);
break;

} // End of switch (style).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.
getSystemLookAndFeelClassName());
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
e.printStackTrace(); // Never happens
}
Expand Down

0 comments on commit 22e160a

Please sign in to comment.