RFR: 8300269: The selected item in an editable JComboBox with titled border is not visible in Aqua LAF [v2]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Jan 23 06:35:07 UTC 2023
On Fri, 20 Jan 2023 21:24:42 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java line 460:
>>
>>> 458: protected Rectangle rectangleForCurrentValue() {
>>> 459: int width = comboBox.getWidth();
>>> 460: int height = comboBox.getBorder() == null ? 22 : comboBox.getHeight();
>>
>> Before JDK-8054572, comboBox.getHeight()+1 was used , shouldn't we use the same if we are going to fallback to previous way with border
>>
>> `editorRect.height += 1;`
>>
>> Also, it seems for TitledBorder the popupmenu is not aligned properly. It should have been at the base of the combobox, just as it is for without border...although I don think it's related to this fix but seems to be a bug nevertheless (in Date/Time macos settings, popupmenu for editable combobox is at the base)
>>
>> 
>>
>> =======
>> Without border
>>
>> 
>
> Adding 1 to the height would go back to the previous implementation, but it actually causes the comboBox to look more misaligned by 1 extra pixel. I can re-add the +1 to return to the original method if preferred.
>
> <img width="63" alt="Screen Shot 2023-01-20 at 12 54 47 PM" src="https://user-images.githubusercontent.com/96267980/213807706-81de1e18-8922-43f4-8313-72d8332a20b1.png">
>
> I see the popup issue on my end as well. But this seems to be unrelated to the fix as you mentioned. I can create a separate JBS issue for this if needed.
OK. I guess that's in Monterey, right? I guess it doesn't cause any difference in BigSur where I tested so I asked.
For popup issue, yes, please raise a JBS..
-------------
PR: https://git.openjdk.org/jdk/pull/12087
More information about the client-libs-dev
mailing list