Skip to content

Commit

Permalink
Change font size, in Syntax text view, using derived font
Browse files Browse the repository at this point in the history
  • Loading branch information
thc202 committed Dec 30, 2015
1 parent 47bcb21 commit cd90ace
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public HttpPanelSyntaxHighlightTextArea() {
setClearWhitespaceLinesEnabled(false);

// Correct the font size
this.setFont(FontUtils.getFont(this.getFont().getFontName()));
this.setFont(getFont().deriveFont((float) FontUtils.getDefaultSize()));

initHighlighter();
}
Expand Down
4 changes: 4 additions & 0 deletions src/org/zaproxy/zap/utils/FontUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,8 @@ public static float getScale() {
}
return scale;
}

public static int getDefaultSize() {
return getDefaultFont().getSize();
}
}

0 comments on commit cd90ace

Please sign in to comment.