|
|
|
@ -143,6 +143,8 @@ public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyCh
|
|
|
|
|
@Override |
|
|
|
|
protected Rectangle getVisibleEditorRect() { |
|
|
|
|
Rectangle rect = super.getVisibleEditorRect(); |
|
|
|
|
System.out.println(editor); |
|
|
|
|
if (rect != null) { |
|
|
|
|
FontMetrics fm = SwingUtilities2.getFontMetrics(editor, editor.getFont()); |
|
|
|
|
int asc = fm.getMaxAscent(); |
|
|
|
|
Insets ins = editor.getInsets(); |
|
|
|
@ -150,6 +152,7 @@ public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyCh
|
|
|
|
|
rect.y = ins.top + (height - asc) / 2; |
|
|
|
|
rect.y -= fm.getDescent() / 2; |
|
|
|
|
adjustTextRect(getComponent(), rect); |
|
|
|
|
} |
|
|
|
|
return rect; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|