mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-67480 Font baseline is shifted for Consolas font
fix for SimpleColoredComponent
This commit is contained in:
@@ -953,7 +953,7 @@ public class SimpleColoredComponent extends JComponent implements Accessible, Co
|
||||
}
|
||||
|
||||
public static int getTextBaseLine(@NotNull FontMetrics metrics, final int height) {
|
||||
return (height - metrics.getHeight()) / 2 + metrics.getAscent();
|
||||
return (height - metrics.getHeight()) / 2 + metrics.getAscent() + metrics.getLeading(); // adding leading to ascent, just like in editor
|
||||
}
|
||||
|
||||
private static void checkCanPaint(Graphics g) {
|
||||
|
||||
Reference in New Issue
Block a user