Jfoenix: JFXButton white highlight on focused

Created on 5 Jun 2018  路  5Comments  路  Source: sshahine/JFoenix

I followed the instructions in this blog, but I could not cancel the bright white color of the buttons.

https://www.jensd.de/wordpress/?p=1245

How can I do it?

The button turns whitish when receiving the focus.

Most helpful comment

well yeah it's the rippler overlay, you can remove it by using the following css:

.jfx-button{
    -jfx-disable-visual-focus: true;
}

Regards,

All 5 comments

By default, JFXButton removes the highlight through css. btw, the blog you mentioned is related to JavaFX button, not JFXButton.

thanks for answering, apologies for the blog that is not with JFoenix, I include the difference:

Only button Save is focused:

crop1

Only button Delete is focused:

crop2

The color the button is focused, see the color difference pale to lit.

Cancel the effect but it remains the same:

-fx-effect: none;

I thought it was the rippler but nothing.; Any clue what can happen?

hello again, here's the stylesheet I use:

.jfx-button {
    -fx-pref-height: 36px;
}

/* Focused */
/*.jfx-button.mat-raised-button:focused {
    -fx-background-insets: -2, 2, 2, 2;
}*/

/* Button Type */
.mat-raised-button {
    -fx-background-color: white;
    -jfx-button-type: RAISED;
}

.mat-primary {
    -fx-background-color: -fx-primary;
}

.mat-accent {
    -fx-background-color: -fx-accent;
}

.mat-warn {
    -fx-background-color: -fx-warn;
}

.jfx-button.mat-primary, .jfx-button.mat-accent, .jfx-button.mat-warn {
    -fx-text-fill: white;
}

/* Button with icon */
.mat-primary .ikonli-font-icon, .mat-accent .ikonli-font-icon, .mat-warn .ikonli-font-icon {
    -fx-icon-color: white;
}

.mat-icon-button.mat-primary, .mat-icon-button.mat-accent, .mat-icon-button.mat-warn {
    -fx-background-color: transparent;
}

/* Button Icon */
.mat-icon-button .ikonli-font-icon {
    -fx-icon-color: -fx-gray;
    -fx-icon-size: 24px
}

.mat-icon-button.mat-primary .ikonli-font-icon {
    -fx-icon-color: -fx-primary;
}

.mat-icon-button.mat-accent .ikonli-font-icon {
    -fx-icon-color: -fx-accent;
}

.mat-icon-button.mat-warn .ikonli-font-icon {
    -fx-icon-color: -fx-warn;
}

/* Button Raised with Icon */
.mat-icon-button.mat-raised-button .ikonli-font-icon {
    -fx-icon-color: black;
    -fx-icon-size: 28px;
}

well yeah it's the rippler overlay, you can remove it by using the following css:

.jfx-button{
    -jfx-disable-visual-focus: true;
}

Regards,

That solves the problem, thank you very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imgx64 picture imgx64  路  5Comments

evillatoro picture evillatoro  路  3Comments

TioCoding picture TioCoding  路  5Comments

RodrigoSantiago picture RodrigoSantiago  路  3Comments

deme78 picture deme78  路  3Comments