1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00

Bug 559514 - Cleanup codebase

Move away of deprecated FontMetrics.getAverageCharWidth.
The new method is getAverageCharacterWidth returning double.

Change-Id: Ic9c60073bb0c1219c4ef422e933de0576556e88c
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
Alexander Kurtakov 2020-01-24 00:23:59 +02:00 committed by Greg Watson
parent e03fdd5977
commit f272b16a03
2 changed files with 2 additions and 2 deletions

View file

@ -497,7 +497,7 @@ public class JSchConnectionPage extends WizardPage {
if (data instanceof GridData) {
GC gc = new GC(text);
FontMetrics fm = gc.getFontMetrics();
int width = chars * fm.getAverageCharWidth();
int width = (int) (chars * fm.getAverageCharacterWidth());
gc.dispose();
((GridData) data).widthHint = width;
}

View file

@ -420,7 +420,7 @@ public class ProxyConnectionPage extends WizardPage {
if (data instanceof GridData) {
GC gc = new GC(text);
FontMetrics fm = gc.getFontMetrics();
int width = chars * fm.getAverageCharWidth();
int width = (int) (chars * fm.getAverageCharacterWidth());
gc.dispose();
((GridData) data).widthHint = width;
}