JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
634 stars 30 forks source link

IconButton lacks background in focused state #411

Closed rock3r closed 2 weeks ago

rock3r commented 2 weeks ago

org.jetbrains.jewel.ui.component.IconButton doesn't render any differently when it has the focus, in contrast to IJ toolbar buttons:

image

rock3r commented 2 weeks ago

After checking the Swing implementation, I noticed that ActionButtons are NOT supposed to be focusable/navigatable with the keyboard unless a screen reader is active. The example shown above is one of the handful of exceptions, only seen in Studio, which forcefully makes the action buttons focusable by calling com.android.tools.adtui.util.ActionToolbarUtilKt#makeNavigable

Given this is not the default behaviour, and you can achieve it with a customised IconButtonStyling that assigns a specified colour to focused states, I'm not going to implement this.