On Thu, 19 Jun 2025 04:10:20 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> RBMenuItem's and CBMenuItem's checkmark on the left side are not visible >> while running on Windows L&F as background color is same as >> RBMenuItem/CBMenuItem's checkmark.. >> Modified the color so that they are visible.. > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Remove author tag This fix does **not** look good to me, it does not fix the problem. You have fixed the test to make the problem disappear. @TejeshR13 [said](https://github.com/openjdk/jdk/pull/25864#discussion_r2153676999), > The test is specifically for background color black, I think you need to > retain background color. I absolutely agree with Tejesh's concern. If an app developer sets the background of a `JCheckboxMenuItem` or `JRadioButtonMenuItem` to black, they'll be no way for the user to see whether it's selected or not. The developer set the foreground to white, yet Windows L&F doesn't respect this setting, it still renders the same black check mark or bullet. Essentially, Windows visual style theming doesn't support arbitrary backgrounds. Windows Classic L&F does supported. You used a gray background color for `JCheckboxMenuItem` or `JRadioButtonMenuItem` so that the black check mark and bullet are visible. How does this fix address the problem that they're still invisible on the black background?! [JDK-4449413](https://bugs.openjdk.org/browse/JDK-4449413) was about Metal L&F. Essentially, all the skinning, like Metal Ocean theme gradients or Nimbus and Synth may not work well with color customisations. The fact that this test passes in Nimbus L&F is a pure coincidence: it uses a lighter color for the check mark and bullet, that's why they're visible. If I change the color to `0x474748`, the check mark and bullet become invisible. Is it a bug? I think this test, `javax/swing/JCheckBox/4449413/bug4449413.java`, should be limited to specific L&Fs where changing the foreground color is respected. If not, then the test should explicitly iterate over all installed or supported L&Fs so that all the L&Fs are always tested. What do you, @prrace, think? ------------- PR Comment: https://git.openjdk.org/jdk/pull/25864#issuecomment-2992027022