CheckBox: changed CheckBox.arc from radius to diameter to be consistent with Button.arc and Component.arc

This commit is contained in:
Karl Tauber
2019-12-14 23:24:19 +01:00
parent 05743e2d8b
commit 736c7b8377
3 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,8 @@ FlatLaf Change Log
## Unreleased
- TabbedPane: Support background color for selected tabs.
- CheckBox: changed `CheckBox.arc` from radius to diameter to be consistent with
`Button.arc` and `Component.arc`
## 0.21

View File

@@ -133,17 +133,17 @@ public class FlatCheckBoxIcon
protected void paintFocusBorder( Graphics2D g2 ) {
// the outline focus border is painted outside of the icon
int wh = ICON_SIZE - 1 + (focusWidth * 2);
int arcwh = (arc + focusWidth) * 2;
int arcwh = arc + (focusWidth * 2);
g2.fillRoundRect( -focusWidth + 1, -focusWidth, wh, wh, arcwh, arcwh );
}
protected void paintBorder( Graphics2D g2 ) {
int arcwh = arc * 2;
int arcwh = arc;
g2.fillRoundRect( 1, 0, 14, 14, arcwh, arcwh );
}
protected void paintBackground( Graphics2D g2 ) {
int arcwh = (arc * 2) - 1;
int arcwh = arc - 1;
g2.fillRoundRect( 2, 1, 12, 12, arcwh, arcwh );
}

View File

@@ -102,7 +102,7 @@ Button.default.borderWidth=1
CheckBox.border=com.formdev.flatlaf.ui.FlatMarginBorder
CheckBox.icon=com.formdev.flatlaf.icons.FlatCheckBoxIcon
CheckBox.arc=2
CheckBox.arc=4
CheckBox.margin=2,2,2,2
CheckBox.iconTextGap=4
CheckBox.rollover=true