FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

Button rounded border

Open Bodyash opened this issue 3 years ago • 1 comments

When using Button.arc + Button.bordercolor + Button.borderWidth everything is okay image

But if I use just Button.border the background shape is square and button.arc is ignored. But button look like oval.

image

Bodyash avatar Jun 21 '22 14:06 Bodyash

This is because in the first case, class FlatButtonBorder (extends FlatBorder) is used. The button knows that this border supports rounded corners and fills its background using corner radius from the border.

In second case, class FlatLineBorder is used, which is not designed to be used as component/button border. This border does not support focus indication (which you do not need in your design) or different border colors for hover, disabled and focused. The button does not know that this border has rounded corners...

I'll have a look whether it makes sense to change this...

DevCharly avatar Jun 30 '22 12:06 DevCharly