How do I remove the default border glow of a JavaFX button (when selected)?

前端 未结 6 593
自闭症患者
自闭症患者 2020-11-27 15:02

I\'m trying to remove the border glow (please see screenshot below) that appears by default when a JavaFX button is selected:

6条回答
  •  甜味超标
    2020-11-27 15:50

    If you want to remove this focus ring in JavaFX 8, rewrite the :focus selector with the .button selector style from modena.css.

    .button:focused {
        -fx-background-color: -fx-outer-border, -fx-inner-border, -fx-body-color; 
        -fx-background-insets: 0, 1, 2;
        -fx-background-radius: 5, 4, 3;
    }
    

提交回复
热议问题