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

View File

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