Skip to content

Commit dfa6642

Browse files
committed
Stop using deprecated FontMetrics.getAverageCharWidth
1 parent 4ea5b98 commit dfa6642

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2006 IBM Corporation and others.
2+
* Copyright (c) 2000, 2024 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -56,7 +56,7 @@ public void fill(Composite parent) {
5656
GC gc = new GC(parent);
5757
gc.setFont(parent.getFont());
5858
FontMetrics fm = gc.getFontMetrics();
59-
widthHint = fm.getAverageCharWidth() * charWidth;
59+
widthHint = (int) (fm.getAverageCharacterWidth() * charWidth);
6060
heightHint = fm.getHeight();
6161
gc.dispose();
6262
}

0 commit comments

Comments
 (0)