Noticed this SWT API call had been deprecated. #51

This commit is contained in:
Rob Greene 2020-11-24 19:34:29 -06:00
parent b78253175d
commit febe3d9f75
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ public class SwtUtil {
FontMetrics fontMetrics = gc.getFontMetrics();
gc.dispose();
int fontHeight = fontMetrics.getHeight();
int fontWidth = fontMetrics.getAverageCharWidth();
int fontWidth = (int)fontMetrics.getAverageCharacterWidth();
Rectangle clientArea = composite.getClientArea();
int lines = clientArea.height / fontHeight;
int pageHeight = lines * fontHeight;