RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v11]

Alisen Chung achung at openjdk.java.net
Fri May 6 22:09:32 UTC 2022


On Fri, 6 May 2022 11:53:03 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   saved translation values in EtchedBorder, updated test
>
> src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 137:
> 
>> 135: 
>> 136:         g.drawLine((3*stkWidth/2)-1, h-(stkWidth-stkWidth/2),
>> 137:                 w-(stkWidth-stkWidth/2), h-(stkWidth-stkWidth/2)); // bottom line
> 
> Suggestion:
> 
>         g.drawLine(stkWidth/2, h-(stkWidth-stkWidth/2),
>                 w-(stkWidth-stkWidth/2), h-(stkWidth-stkWidth/2)); // bottom line
> 
> If you change the initial `x` to be `stkWidth/2`, it always aligns with the rectangle drawn in `paintBorderRect`. Thus the issue where the bottom highlight line is short of a few pixels gets resolved.

Fixed

-------------

PR: https://git.openjdk.java.net/jdk/pull/7449



More information about the client-libs-dev mailing list