Merge PR #987: Enhance FlatUIUtils.getBorderArc to support FlatLineBorder Arc value
Some checks failed
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
Error Prone / error-prone (push) Has been cancelled

This commit is contained in:
Karl Tauber
2025-11-30 00:44:22 +01:00

View File

@@ -474,6 +474,9 @@ public class FlatUIUtils
* Returns the scaled arc diameter of the border for the given component.
*/
public static float getBorderArc( JComponent c ) {
if( c.getBorder() instanceof FlatLineBorder )
return UIScale.scale( ((FlatLineBorder)c.getBorder()).getArc() );
FlatBorder border = getOutsideFlatBorder( c );
return (border != null)
? UIScale.scale( (float) border.getArc( c ) )