On Tue, 7 Feb 2023 08:15:58 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> https://github.com/openjdk/jdk/blob/98433a2f6e7fe97e03ed26673c9925d7b26466bf/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java#L552-L558
> 
> The present code SynthComboBoxRenderer does enable/disable the listcell 
> renderer based on comboBox status, why it is not working? why do we need to 
> use a listener for DefaultListCellRenderer?
> 
> 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

The setEnabled line you mentioned in SynthComboBoxUI applies to 
SynthComboBoxRenderer only. This issue only occurs when DefaultListCellRenderer 
is used for a disabled Nimbus ComboBox instead of the default renderer for 
Nimbus (SynthComboBoxRenderer). So this code is never reached.

I will work on making the test automated instead if preferred.

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

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

Reply via email to