RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v2]

Damon Nguyen dnguyen at openjdk.org
Mon Aug 8 10:26:10 UTC 2022


On Thu, 14 Jul 2022 16:25:12 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> Can you please show before and after fix image of the editable combobox? It seems the border around the button makes it feel it's still not aligned properly which gives the impression that the button is bigger than textfield. Probably we can do away with the button border, if we can, in case we cannot draw the border around the whole textfield+button.
> 
> Also, I think if you try with different font size e.g. `comboBox.setFont(new Font("Serif", Font.PLAIN, 30));`
> 
> you will again see the editable combobox button height is not matching textfield height whereas non editable one it is aligned..

I have looked into and tested for the setFont issue for sizing editable ComboBox's in Aqua L&F. A non-editable ComboBox in Aqua does NOT increase the height of the text area of the ComboBox with larger fonts. 
Here is an image where I increased the button by 50px in height and width:
<img width="570" alt="Screen Shot 2022-08-08 at 2 04 32 AM" src="https://user-images.githubusercontent.com/96267980/183395619-e6d517f9-569b-4882-a2b0-c724a84a3e77.png">


This seems to be Aqua specific because when tested in other L&F's like Metal, the text areas and buttons increase in height to accommodate larger text. 
Here's an image from Metal L&F:
<img width="663" alt="Screen Shot 2022-08-08 at 3 20 59 AM" src="https://user-images.githubusercontent.com/96267980/183396754-fc3fbd4b-7229-4f39-9331-d415813fc3e3.png">


Additionally, the button of the ComboBox in Aqua never changes size as it seems the button appearance is pre-determined by JRS values. Increasing the size of the arrowButton in Aqua takes up the space that the enlarged button should take, but the button will still appear small.
This screenshot shows the Aqua button triggering the dropdown list after clicking the blank space where the button should be stretched to:
<img width="577" alt="Screen Shot 2022-08-08 at 2 04 48 AM" src="https://user-images.githubusercontent.com/96267980/183395864-ea860edc-8312-49b5-8d4b-346cfb593240.png">

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

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



More information about the client-libs-dev mailing list