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

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Mon Apr 20 09:40:56 UTC 2020


On 19-Apr-20 8:52 PM, Sergey Bylokhov wrote:
> On 4/17/20 4:16 am, Prasanta Sadhukhan wrote:
>> Also, the popupType will remain LW as we are only using it to create 
>> the tip but doing setPopupType() to LW after tooltip popup creation.
>>
>> http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.3/
>
> This is equivalent to using HW tooltip every time on the HiDPI screen, 
> and unfortunately it has a side effect.
>
> If the tooltip is HW it is drawn in a separate window and is not 
> inherit opacity/translucency of the parent,
> you can check that by these changes in the test:
>     frame.setLocationRelativeTo(null);
>    +frame.setUndecorated(true);
>    +frame.setOpacity(.5f);
>     frame.setVisible(true);
>
> I still think that using right GC in the tip, is probably better way 
> to fix it.
>
http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/

used the right GC for the tip but we still need the preferredSize in the 
paint()

Regards
Prasanta


More information about the swing-dev mailing list