bulenkov / Darcula

Darcula Look and Feel
Apache License 2.0
723 stars 114 forks source link

Support for icon-only buttons/fixed listener (un)installation in TextFieldUI #26

Closed hendriks73 closed 7 years ago

hendriks73 commented 7 years ago

These two commits fix one issue and improve the library in another regard.

  1. The listeners in the DarculaTextFieldUI classes weren't properly added and removed when the L&F was changed. Instead they were only added. This led to NPEs when changing the L&F and then opening the search field popup, as getComponent() returned null.
  2. I couldn't find a way to create a button that only displays the icon. It turned out that the contentAreaFilled property was not honored. I added a flag to the code that make sure the rounded rectangle is not drawn, when contentAreaFilled==false.

I'd appreciate it, if you merged the two changes.

Thanks.

bulenkov commented 7 years ago

Thanks!