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:
parent
e03fdd5977
commit
f272b16a03
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue