<Swing Dev> RFR 8245921:Minor copy/paste issue in BasicScrollBarUI
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Tue Jun 30 02:40:17 UTC 2020
Hi, Prasanta.
The change looks fine, but can you please attach to the bug report the images
before/after the fix. Just to be sure that it will look good.
On 6/25/20 4:23 am, Prasanta Sadhukhan wrote:
> Hi All,
>
> Please review a small fix for a minor copy/paste error in javax.swing.plaf.basic.BasicScrollBarUI.installDefaults()
>
> if ("large".equals(scaleKey)){
> scrollBarWidth *= 1.15;
> incrGap *= 1.15;
> decrGap *= 1.15;
> } else if ("small".equals(scaleKey)){
> scrollBarWidth *= 0.857;
> incrGap *= 0.857;
> decrGap *= 0.714;
> } else if ("mini".equals(scaleKey)){
> scrollBarWidth *= 0.714;
> incrGap *= 0.714;
> decrGap *= 0.714;
> }
>
> In the "small" case, decrGap is multiplied by 0.714 instead of 0.857.
>
> This code snippet has been added as part of the enhancement to support Nimbus L&F in JDK-6591875. <https://bugs.openjdk.java.net/browse/JDK-6591875>
>
> In SynthScrollBarUI.java which is also added as part of above JBS, the correct value is used http://hg.openjdk.java.net/jdk/client/annotate/43e06bc950ec/jdk/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java#l116
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8245921
>
> diff -r b1bd79b486bc src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
> --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java Wed Jun 10 12:43:22 2020 +0530
> +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java Thu Jun 25 12:57:37 2020 +0530
> @@ -270,7 +270,7 @@
> } else if ("small".equals(scaleKey)){
> scrollBarWidth *= 0.857;
> incrGap *= 0.857;
> - decrGap *= 0.714;
> + decrGap *= 0.857;
> } else if ("mini".equals(scaleKey)){
> scrollBarWidth *= 0.714;
> incrGap *= 0.714;
>
> Regards
> Prasanta
--
Best regards, Sergey.
More information about the swing-dev
mailing list