Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Child pane css style when parent pane has -fx-border-radius in JavaFX

Tags:

java

javafx

I have two panes - parent pane and child pane. Child pane is inside parent pane. Parent pane has the following css rules:

-fx-border-color:derive(-fx-background, -35%);
-fx-border-width:1;
-fx-border-style:solid;
-fx-border-radius:4;

Child pane has the following css rules:

-fx-background-radius:25;

And this is one of the corner:
enter image description here

As you see the corner is a little pale - I mean parent border is not well seen in the very corner (left bottom corner). To solve this problem I added to child -fx-background-radius:25 however it didn't help. How to fix it, taking into consideration I can't add padding to parent or margin to child?

like image 218
Pavel_K Avatar asked Nov 08 '22 16:11

Pavel_K


1 Answers

try adding: -fx-background-radius:4; to your parent panel (same radius as border)

like image 113
Leonardo Pina Avatar answered Nov 15 '22 00:11

Leonardo Pina