<Swing Dev> [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Fri Mar 27 10:27:46 UTC 2020
On 07-Dec-19 10:28 AM, Sergey Bylokhov wrote:
> On 12/6/19 7:24 pm, Prasanta Sadhukhan wrote:
>>> How other components which may use HTML inside calculates its
>>> preferred size? I do not remember that they additionally scale the
>>> values returned by the View.
>>
>> Maybe those components does not use preferredSize calculation as
>> JTooltip does.
>
> Even if it not used, the preferredSize of the components and views
> should return correct values.
>
>
getPreferredSize() is called from ToolTipManager but it is done *before
*calling Tooltip.show() which actually triggers PropertyChangeEvent with
"graphicsConfiguration" property.
Now, View is updated by calling BasicHTML.updateRenderer() when
"graphicsConfiguration" property is fired to notify transform is
changed, so during preferredSize() call, the View has not yet been
updated with correct transform.
So, my proposed fix is still same
http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.1/
Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200327/d2906b3d/attachment.htm>
More information about the swing-dev
mailing list