diff --git a/CHANGELOG.md b/CHANGELOG.md index c90fdec2..aecb9b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java index 0d20061c..1e492803 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java @@ -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 ); } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index a1d71043..140a9d77 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -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