How to remove shadow from JavaFX tabs?

I have tabs in JavaFX and I want to set a style for removing shadows:

enter image description here

If you look at the left side of foo, you can see the shadows.

This is my current style:

.tab { -fx-background-color: #393939; -fx-border-color: #282828; -fx-border-width: 0; -fx-padding: 1 8; } 

I tried to study the documentation, but could not find a way to remove the shadows: http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tabpane

+6
source share
1 answer

To find the default stylesheet, find the jfxrt.jar file on your computer, open it in an archiver such as WinRAR, and open com/sun/javafx/scene/control/skin/caspian.css . With this knowledge, you can easily see what may be there that is causing the problem.

caspian.css also available online, here is a link to JavaFX 2.2 .

Now add this style:

 .tab-pane .headers-region { -fx-effect: null; } 

It removes the default style and the shadows disappear.

+10
source

Source: https://habr.com/ru/post/923985/


All Articles