Details
-
Bug
-
Resolution: Fixed
-
P4
-
14, 15
-
b05
-
x86_64
-
windows_10
Description
ADDITIONAL SYSTEM INFORMATION :
OpenJDK 14, but according to Swing developer's mailing list "This code snippet is part of the enhancement that has been added to support Nimbus L&F. It seems to be a bug as it is like this from initial commit for the enhancement."
A DESCRIPTION OF THE PROBLEM :
I came across the following code 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.
Probably a copy/paste error.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Check code :-)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
decrGap *= 0.857;
ACTUAL -
decrGap *= 0.714;
FREQUENCY : always
OpenJDK 14, but according to Swing developer's mailing list "This code snippet is part of the enhancement that has been added to support Nimbus L&F. It seems to be a bug as it is like this from initial commit for the enhancement."
A DESCRIPTION OF THE PROBLEM :
I came across the following code 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.
Probably a copy/paste error.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Check code :-)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
decrGap *= 0.857;
ACTUAL -
decrGap *= 0.714;
FREQUENCY : always