Skip to content

Commit

Permalink
Restore comment font minimum size
Browse files Browse the repository at this point in the history
  • Loading branch information
zsalch authored and zsalch committed Oct 5, 2018
1 parent 406164a commit 40969e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/featurecat/lizzie/gui/LizzieFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,12 @@ public void increaseMaxAlpha(int k) {
private int drawComment(Graphics2D g, int x, int y, int w, int h, boolean full) {
String comment = (Lizzie.board.getHistory().getData() != null && Lizzie.board.getHistory().getData().comment != null) ? Lizzie.board.getHistory().getData().comment : "";
int cHeight = full ? h : (int)(h*0.5);
int fontSize = Lizzie.config.commentFontSize > 0 ? Lizzie.config.commentFontSize : (int)(Math.min(getWidth(), getHeight()) * 0.98 * 0.03);
int fontSize = (int)(Math.min(getWidth(), getHeight()) * 0.0294);
if (Lizzie.config.commentFontSize > 0) {
fontSize = Lizzie.config.commentFontSize;
} else if (fontSize < 16) {
fontSize = 16;
}
Font font = new Font(systemDefaultFontName, Font.PLAIN, fontSize);
commentPane.setFont(font);
commentPane.setText(comment);
Expand Down

0 comments on commit 40969e3

Please sign in to comment.