Insubstantial / insubstantial

Swing look-and-feel library and assorted widgets
193 stars 58 forks source link

Do not paint focus on disabled components #119

Open kschaefe opened 11 years ago

kschaefe commented 11 years ago

It is possible for a component to be disabled while it has focus. Component.hasFocus will still return true. SubstanceCoreUtilities.paintFocus (line 1581) should request the focus strength with a combination of hasFocus and isEnabled:

float focusStrength = transitionAwareUI.getTransitionTracker() .getFocusStrength(focusedComp.hasFocus() && focusedComp.isEnabled());

This will allow disabled component to not paint focus.