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

Reply via email to