RFR: 7093691: Nimbus LAF: disabled JComboBox using renderer has bad font color [v4]

Damon Nguyen dnguyen at openjdk.org
Wed Feb 8 01:41:43 UTC 2023


On Tue, 7 Feb 2023 17:02:51 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> Also, I think it will be better to make the test automated..something like draw comboBox content into BufferedImage and pixel compare if it is same for disabled/enabled and fail if they are same and iterate for all L&Fs as it will also affect GTK as per the comment

I created an automated test, but for some L&F's (such as Nimbus), an enabled vs disabled ComboBox differs in more than just the text color. The background, border, and button color may change as well. So, even if I shave off the dimensions of the border and button, it seems difficult to detect just the text for comparison.

Before the fix, the issue was that the ComboBox as a whole worked correctly for disabled ComboBoxes with a DLCR, but the text was black instead of grey. This was the only difference.

A manual test might still be the best approach since more aspects than just the test color can be checked. So, I think it's best to not automate this test.

-------------

PR: https://git.openjdk.org/jdk/pull/12390



More information about the client-libs-dev mailing list