Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounded border background in buttons not working when using border #958

Open
fedematteis opened this issue Jan 16, 2025 · 1 comment
Open

Comments

@fedematteis
Copy link

Using the properties file customization i tried to create my own button class, but even if attributes like background, foreground and arc work correctly, when i add the border description the button stops being rounded, even if the border appears curved.
This is my properties code:
[style]Button.newButton = \ arc:20;\ border: 5, 10, 5, 10, #FFFFFF, 2, 20; \ foreground: #F6FCFF; \ background: #1EB7F5;\ iconTextGap: 13; \
Image

I've also tried to take out the roundness value from the border, but the arc attribute is still ignored and both button and border are printed squared:
[style]Button.newButton = \ arc:20;\ border: 5, 10, 5, 10, #FFFFFF, 2; \ foreground: #F6FCFF; \ background: #1EB7F5;\ iconTextGap: 13; \

Image

please let me know how could i improve my code, thank you in advance for all the work on flatlaf!

@poce1don
Copy link

Don't use
border: 5, 10, 5, 10, #FFFFFF, 2, 20;
It won't work for JButtons and JTextfields

Use:
Button.arc = 20
Button.borderColor = #FFFFFF
Button.margin = 5,10,5,10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants