Reverting back to deprecated method to support RPi.

This commit is contained in:
Rob Greene 2022-01-15 19:13:18 -06:00
parent e30da7e939
commit 9005a07280

View File

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