<Swing Dev> [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Mar 29 09:37:50 UTC 2019


Hi All,

Please review a fix for an issue where it is seen that HTML tooltips 
aren't big enough to contain their contents on Windows HiDPI displays, 
there by the last word of the tooltip text are missing.

It is an aftereffect of JDK-8178025 
<https://bugs.openjdk.java.net/browse/JDK-8178025> where we update glyph 
fontMetrics if current metrics is different from Container's fontmetrics.
Even if the affinetransform or uiScale is modified, metrics is updated 
as FontMetrics would have changed because of the transform.
This caused the tooltip rectangle to be not able to contain the text 
which is drawn with modified metrics.
Proposed fix is to check if graphics transform has been modified because 
of hidpi scale, in which case, scale the tooltip rectangle accordingly.

Bug: https://bugs.openjdk.java.net/browse/JDK-8213535
webrev: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.0/

I was not able to fashion an automated test for this, so created a 
manual test.

Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20190329/2ea3c568/attachment.html>


More information about the swing-dev mailing list