Skip to content

Commit

Permalink
Merge featurecat#804 (squashed): Add workaround for featurecat#781 (s…
Browse files Browse the repository at this point in the history
…low play/undo/redo)
  • Loading branch information
Hiraoka committed Dec 5, 2020
1 parent 8dfce34 commit 1a0d9b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/featurecat/lizzie/gui/LizzieMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ protected void paintComponent(Graphics g) {
}
// draw the image
Graphics2D bsGraphics = (Graphics2D) g; // bs.getDrawGraphics();
// Note: #781 is caused by repaint of other parts (toolBar in particular) with
// VALUE_ANTIALIAS_ON. To prevent such unwilling side effects, we change
// RenderingHints only temporary here and restore their old values at the bottom of
// this method.
RenderingHints oldHints = bsGraphics.getRenderingHints();
bsGraphics.setRenderingHint(
RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
bsGraphics.setRenderingHint(
Expand Down Expand Up @@ -178,6 +183,7 @@ protected void paintComponent(Graphics g) {
} else if (Lizzie.config.showStatus) {
drawPonderingState(bsGraphics, loadingText(), loadingX, loadingY, loadingSize);
}
bsGraphics.setRenderingHints(oldHints);
}
}
};
Expand Down

0 comments on commit 1a0d9b9

Please sign in to comment.