Grumblesaurus
Grumblesaurus

Reputation: 3119

CSS Selector for 'default' button in a javafx Alert?

in javafx, does anyone know the css selector for the color of the "default" button in an alert? The "Yes" button in light blue here:

enter image description here

Upvotes: 1

Views: 496

Answers (1)

James_D
James_D

Reputation: 209684

The base color for a default button is set to the looked-up color -fx-default-button:

.button:default {
    -fx-base: -fx-default-button;
}

which defaults to the light blue in your screenshot:

.root {

    /* ... */

    -fx-default-button: #ABD8ED;

    /* ... */
}

(Code snippets from modena.css source.)

So you can just change the value of -fx-default-button on your root element.

Upvotes: 2

Related Questions