mbien commented on code in PR #7284:
URL: https://github.com/apache/netbeans/pull/7284#discussion_r1575699480
##########
java/java.editor/src/org/netbeans/modules/editor/java/MethodParamsTipPaintComponent.java:
##########
@@ -135,8 +135,8 @@ protected int getWidth(String s, Font font) {
}
protected int getHeight(String s, Font font) {
- if (font == null) return fontMetrics.stringWidth(s);
- return getFontMetrics(font).stringWidth(s);
+ if (font == null) return fontMetrics.getHeight();
+ return getFontMetrics(font).getHeight();
}
Review Comment:
same here, 90% of the file is identical to `GroovyCompletionCollector.java`
##########
ide/csl.api/src/org/netbeans/modules/csl/editor/completion/MethodParamsTipPaintComponent.java:
##########
@@ -124,8 +124,8 @@ protected int getWidth(String s, Font font) {
}
protected int getHeight(String s, Font font) {
- if (font == null) return fontMetrics.stringWidth(s);
- return getFontMetrics(font).stringWidth(s);
+ if (font == null) return fontMetrics.getHeight();
+ return getFontMetrics(font).getHeight();
}
Review Comment:
the method is never used. @neilcsmith-net @matthiasblaesing should I get rid
of it? Package is not public. I am not completely sure if `getHeight()` is
correct here since fonts are tricky - but it would be certainly more correct
than width was.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists