mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 08:17:12 -06:00
FlatBorder: fixed wrong round edge of focused components in themes without outer focus border (Flat Light/Dark)
This commit is contained in:
@@ -97,10 +97,12 @@ public class FlatBorder
|
|||||||
? (outlineColor != null ? innerOutlineWidth : getInnerFocusWidth( c ))
|
? (outlineColor != null ? innerOutlineWidth : getInnerFocusWidth( c ))
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
|
if( focusWidth > 0 || innerWidth > 0 ) {
|
||||||
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
|
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
|
||||||
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
|
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
|
||||||
focusWidth, borderWidth + scale( innerWidth ), arc );
|
focusWidth, borderWidth + scale( innerWidth ), arc );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// paint border
|
// paint border
|
||||||
g2.setPaint( (outlineColor != null) ? outlineColor : getBorderColor( c ) );
|
g2.setPaint( (outlineColor != null) ? outlineColor : getBorderColor( c ) );
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ public class FlatUIUtils
|
|||||||
float innerArc = arc - (lineWidth * 2);
|
float innerArc = arc - (lineWidth * 2);
|
||||||
|
|
||||||
// reduce outer arc slightly for small arcs to make the curve slightly wider
|
// reduce outer arc slightly for small arcs to make the curve slightly wider
|
||||||
if( arc > 0 && arc < UIScale.scale( 10 ) )
|
if( focusWidth > 0 && arc > 0 && arc < UIScale.scale( 10 ) )
|
||||||
outerArc -= UIScale.scale( 2f );
|
outerArc -= UIScale.scale( 2f );
|
||||||
|
|
||||||
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD );
|
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD );
|
||||||
|
|||||||
Reference in New Issue
Block a user