<Swing Dev> RFR JDK-8226464:TitledBorder label appears cut off on hidpi devices
Jayathirth D v
JAYATHIRTH.D.V at ORACLE.COM
Thu Apr 23 17:02:50 UTC 2020
+1.
Thanks,
Jay
> On 16-Apr-2020, at 4:44 PM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>
> Looks fine.
>
> On 4/15/20 8:32 pm, Prasanta Sadhukhan wrote:
>> Yes, 8075918 fix also works ok with this fix as I can see.
>> Regards
>> Prasanta
>> On 15-Apr-20 10:37 PM, Sergey Bylokhov wrote:
>>> Hi, Prasanta.
>>>
>>> That additional clipping was added as part of JDK-8075918, can you please confirm that JDK-8075918 fix will not be broken by the current one.
>>>
>>> On 4/15/20 5:52 am, Prasanta Sadhukhan wrote:
>>>> Hi All,
>>>>
>>>> Please review a fix for an issue where it is seen that the TitledBorderLabel is cutoff for uiScale>1.25 for SynthLookAndFeel.
>>>>
>>>> It is found that in BasicLabelUI, used for other L&Fs,where the issue is not seen, the paint() method calls layout()=>SwingUtilities.layoutCompoundLabel() to get the clipped version of the label string
>>>>
>>>> but SynthLabelUI#paint calls SynthGraphicsUtils#paintText which calls layoutText() which also used SwingUtilities.layoutCompoundLabel() to get the clipped version of the label string but still it additionally does its own clipping using text bounds.
>>>>
>>>> This bounds is passed in both Basic L&F and Synth L&F via paintEnabledText() and paintText() respectively to SwingUtilities2.drawStringUnderlineCharAt() to drawthe string, so only additional clipping done in SynthL&F is the cause of the problem.
>>>>
>>>> Proposed fix is to remove this additional clipping in SynthL&F.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8226464
>>>>
>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/8226464/webrev.0/
>>>>
>>>> Regards
>>>> Prasanta
>>>
>>>
>
>
> --
> Best regards, Sergey.
More information about the swing-dev
mailing list