-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8218474: JComboBox display issue with GTKLookAndFeel #11555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back abhiscxk! A progress list of the required criteria for merging this PR into |
|
@kumarabhi006 The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
Looks like the JBS issue is closed: |
https://bugs.openjdk.org/browse/JDK-8218474 It seems it is not closed. |
|
No it is confidential or something like that. Cannot open/view it. |
TejeshR13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestComboBoxComponentRendering.java test failed (Synth L&F) in Ubuntu_21 VM machine. .jtr file and Failure case screen captured shared.
@mrserb The bug is open now. Please have a look. |
Run the test in Ubuntu 20,21 and 22 in CI pipeline, test passed for all platform. |
|
@mrserb Please have a look. |
The issue was that I was running in wayland, not xorg. The fix is tested and works fine |
| //adjust the size based on the button width | ||
| size.height += insets.top + insets.bottom + arrowInsets.top | ||
| + arrowInsets.bottom; | ||
| size.width += insets.left + insets.right +arrowInsets.left |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| size.width += insets.left + insets.right +arrowInsets.left | |
| size.width += insets.left + insets.right + arrowInsets.left |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
| buttonHeight : | ||
| arrowButton.getPreferredSize().width; | ||
| //adjust the size based on the button width | ||
| size.height += insets.top + insets.bottom + arrowInsets.top |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that the arrow insets should be applied on top of the component's insets, probably the maximum of both should be selected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For combobox text to render correctly arrow inset need to be applied otherwise the combobox editor shows "..." even for a smaller text.
Since component inset's return (0, 0, 0, 0) in GTK and Nimbus LAF, didn't take the maximum of both into consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrserb Are you ok with the fix or do you want anything to add?
|
@kumarabhi006 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 113 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TejeshR13, @mrserb) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@kumarabhi006 |
|
/sponsor |
|
Going to push as commit c444922.
Your commit was automatically rebased without conflicts. |
|
@TejeshR13 @kumarabhi006 Pushed as commit c444922. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
In case of GTK LAF, the current selected element was not visible due to arrowbutton is rendered in entire display area of Combobox.
The proposed fix is to set the
squareButtonproperty of combobox tofalseso that the arrowbutton didn't take entire combobox display area for rendering. ThegetMinimumSizemethod is overridden inSynthComboBoxUIto consider arrowbutton insets for combobox minimum size.The JCK tests mentioned in JBS seems fine with the fix.
An automated test case is implemented to test in Nimbus and GTK LAF. The text color check is to ensure the current selected item is visible.
When clientlibs tests are run with LAF set to Nimbus and GTK LAF, few test failures observed.
javax/swing/JComboBox/4523758/bug4523758.javatest failed with current fix in GTK LAF.open/test/jdk/javax/swing/JComboBox/TestComboBoxHeight.javatest passes if run in GTK LAF with current fix.In Nimbus LAF, the failures before and after fix has no issues as such.
Although CI jobs looks ok with tests run in their default set LAFs.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11555/head:pull/11555$ git checkout pull/11555Update a local copy of the PR:
$ git checkout pull/11555$ git pull https://git.openjdk.org/jdk pull/11555/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11555View PR using the GUI difftool:
$ git pr show -t 11555Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11555.diff