RFR: 8294254: [macOS] javax/swing/plaf/aqua/CustomComboBoxFocusTest.java failure [v2]

Damon Nguyen dnguyen at openjdk.org
Tue Oct 11 18:17:16 UTC 2022


On Tue, 11 Oct 2022 07:08:57 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>> 
>>  - Merge branch 'master' into 8294254/overlapFixEditableCombobox
>>  - Merge branch 'openjdk:master' into 8294254/overlapFixEditableCombobox
>>  - Remove test from problem list
>>  - Adjust rect width to remove overlap
>
> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java line 478:
> 
>> 476:             else {
>> 477:                 return new Rectangle(insets.left + buttonSize, insets.top + midHeight,
>> 478:                         width - (insets.left + insets.right + buttonSize) + 3,
> 
> I guess previous to this fix, we were using BasicComboBoxUI#rectangleForCurrentValue() which returns a width on which we add +4 for editor/textField width.
> Since the calculation is basically same for width, why was it giving problem now (where only height is modified in the 8054572 fix) and not before this fix. I dont think this test use to fail before this fix was integrated with promoted CI builds

Previously, editable comboboxes on macOS were misaligned altogether. The button and textfield were not at the same height (as seen on the "before" screenshots in [https://bugs.openjdk.org/browse/JDK-8054572](https://bugs.openjdk.org/browse/JDK-8054572)). My assumption is that these pixels that would normally overlap are no longer overlapping because of this.

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

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



More information about the client-libs-dev mailing list