To make my tab corners rounded I use the following code:
.tab {
-fx-border-radius: 10 10 0 0;
-fx-background-radius: 10 10 0 0;
}
.tab:selected .focus-indicator {
-fx-border-radius: 10 10 0 0, 10 10 0 0;
}
However, I get rather strange behaviour. When new tab is created it has some extra corners which later disappear when I change focus or create new tab.
For example - I create the first tab.
Now I create the second tab. The first tab is already normal, but the second has this strange corners.
I've checked on centos and win7 - behaviour is the same. How to fix it?
EDIT 1
This is all my css file. The final target to make tab headers bigger with rounded corners.
.tab:selected .focus-indicator {
-fx-border-radius: 10 10 0 0, 10 10 0 0;
-fx-border-insets: -7 -7 -9 -8, -5 -5 -9 -6;
}
.tab-pane > .tab-header-area > .headers-region > .tab:selected{
-fx-border-insets: 10 10 10 10, 10 10 10 10;
}
.tab-pane > .tab-header-area > .headers-region > .tab > .tab-container >
.tab-label {
-fx-alignment: CENTER;
-fx-text-fill: -fx-text-base-color;
-fx-padding:0 10 0 0;
}
.tab-header-area .tab{
-fx-padding:4 10 5 10;
-fx-border-radius: 10 10 0 0;
-fx-background-radius: 10 10 0 0;
}
EDIT 2
I've checked it on two different PC: 1(Ubuntu),2(Centoc 71 and VM Win7). I tried to compile with oracle jdk - result is the same.