Disabling focus color in Lemur

Is there any simple global way to disable the green text color when a button is focused?

Really, I wouldn’t mind disabling focus features (navigation and visuals) completely, but then text input fields and such which need focus won’t work. I guess I could subclass Button and try disabling focus or focus color in the constructor - any other ways that require fewer code changes before I start looking into that?

Is it the color you don’t like or you just don’t want to be able to use keyboard navigation at all?

Edit: because focusColor is a stylable property so you could set it globally just by setting the style.

It’s not that specific color, I’d rather not have it change color at all. I could try making the focus color the same as the text default, but not sure if it’ll prevent me from overriding the color when I want to show the button “toggled” on.

Just set it to null for the style and it disables it.

Almost - that did stop the green, but now it stays yellow (the mouseover color) after being clicked. Can’t disable that one, we gotta have mouseover indicators.

Mm… seems like maybe the resetColors() method needs a slight refactoring…

To avoid taking the branches if the colors are null… since it’s a big if/else chain.

Not precisely sure what you have in mind, maybe this introduces other issues, but this does seem to work for me (with focusColor=null) without breaking focus when focusColor is null.

protected void resetColors() {
    boolean colorNotSet = true;
    boolean shadowColorNotSet = true;
    if (focusOn && highlightOn) {
        // Mix them
        ColorRGBA color = mix(getHighlightColor(), getFocusColor());
        if (color != null) {
            colorNotSet = false;
        ColorRGBA shadow = mix(getHighlightShadowColor(), getFocusShadowColor());
        if (shadow != null) {
            shadowColorNotSet = false;
    } else if (highlightOn) {
        if (getHighlightColor() != null) {
            colorNotSet = false;
        if (getHighlightShadowColor() != null) {
            shadowColorNotSet = false;
    } else if (focusOn) {
        if (getFocusColor() != null) {
            colorNotSet = false;
        if (getFocusShadowColor() != null) {
            shadowColorNotSet = false;
    if (colorNotSet) {
        // Just the plain color
    if (shadowColorNotSet) {

It’s not exactly what I had in mind but the effect is the same. The only down side is that it allows shadow colors to mix with colors not necessarily intended.

But if it’s working for you then it’s good until I do a fix (soon I hope).

Edit: if you are curious… my fix would have been to change the conditions to include null checks for the main color… but actually I run into a similar shadow color issue that way.