mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 15:00:54 +03:00
CheckBox: changed CheckBox.arc from radius to diameter to be consistent with Button.arc and Component.arc
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user