Skip to content
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

8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF #10177

Closed
wants to merge 9 commits into from

Conversation

prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Sep 6, 2022

CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly.
Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState().

Closed test as mentioned in JBS is used to check the fix.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10177/head:pull/10177
$ git checkout pull/10177

Update a local copy of the PR:
$ git checkout pull/10177
$ git pull https://git.openjdk.org/jdk pull/10177/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10177

View PR using the GUI difftool:
$ git pr show -t 10177

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10177.diff

…n on disabled checkbox and radio button with Nimbus LAF
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 6, 2022

👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 6, 2022
@openjdk
Copy link

openjdk bot commented Sep 6, 2022

@prsadhuk The following label will be automatically applied to this pull request:

  • client

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.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 6, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 6, 2022

Webrevs

@mrserb
Copy link
Member

mrserb commented Sep 8, 2022

⚠️ Failed to retrieve information on issue 8075916.
JBS issue is closed.

@prsadhuk
Copy link
Contributor Author

prsadhuk commented Sep 9, 2022

Its open now

@jayathirthrao
Copy link
Member

Does this fix the issue in GTK LAF also? I see a comment in JBS that same issue is with GTK LAF.

@jayathirthrao
Copy link
Member

Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF.
Also it looks like closed test is unstable:

  1. With default LAF test hangs in my mac
  2. With Nimbus LAF it passes without the fix.

Its better to add separate regression test to verify this fix.

@prsadhuk
Copy link
Contributor Author

Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable:

1. With default LAF test hangs in my mac

2. With Nimbus LAF it passes without the fix.

Its better to add separate regression test to verify this fix.

I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix.

@jayathirthrao
Copy link
Member

Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable:

1. With default LAF test hangs in my mac

2. With Nimbus LAF it passes without the fix.

Its better to add separate regression test to verify this fix.

I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix.

I have Monterey. I think its better to have open test case which verifies the behavior specific to Nimbus LAF(and may be GTK LAF if that is also getting fixed under this bug)

@prsadhuk
Copy link
Contributor Author

Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable:

1. With default LAF test hangs in my mac

2. With Nimbus LAF it passes without the fix.

Its better to add separate regression test to verify this fix.

I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix.

I have Monterey. I think its better to have open test case which verifies the behavior specific to Nimbus LAF(and may be GTK LAF if that is also getting fixed under this bug)

I tested on Monterey also and there also I didn't see this problem.
Default L&F passed and Nimbus L&F failed without fix.

@jayathirthrao
Copy link
Member

Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable:

1. With default LAF test hangs in my mac

2. With Nimbus LAF it passes without the fix.

Its better to add separate regression test to verify this fix.

I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix.

I have Monterey. I think its better to have open test case which verifies the behavior specific to Nimbus LAF(and may be GTK LAF if that is also getting fixed under this bug)

I tested on Monterey also and there also I didn't see this problem. Default L&F passed and Nimbus L&F failed without fix.

Okay. I have new M1 machine may be it is machine specific issue.

Copy link
Contributor

@TejeshR13 TejeshR13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix tested and verified.

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide the regression test which iterates over all Look-and-Feels to make sure the setting is always honoured.

@prsadhuk
Copy link
Contributor Author

Please provide the regression test which iterates over all Look-and-Feels to make sure the setting is always honoured.

Test added

@openjdk
Copy link

openjdk bot commented Sep 28, 2022

@prsadhuk 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:

8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF

Reviewed-by: tr, aivanov

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 324 new commits pushed to the master branch:

  • 37f83b9: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow
  • 60616f2: 8294059: Serial: Refactor GenCollectedHeap::collect
  • ea61671: 8294359: Interpreter(AArch64) intrinsify Thread.currentThread()
  • c42ef70: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear.
  • 94e14da: 8294057: Parallel: Tighten ParallelCompactData::initialize_region_data
  • 1ea0d6b: 8292301: [REDO v2] C2 crash when allocating array of size too large
  • c13e0ef: 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7
  • 79ccc79: 8293613: need to properly handle and hide tmp VTMS transitions
  • 5e1e449: 8290920: sspi_bridge.dll not built if BUILD_CRYPTO is false
  • d827fd8: 8294430: RISC-V: Small refactoring for movptr_with_offset
  • ... and 314 more: https://git.openjdk.org/jdk/compare/bd674dc55e87940f442cb140841f95424b6d42fd...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 28, 2022
@prsadhuk
Copy link
Contributor Author

prsadhuk commented Oct 7, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 7, 2022

Going to push as commit f3a44a4.
Since your change was applied there have been 437 commits pushed to the master branch:

  • 37bd4fb: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null
  • d4c9a88: 6560981: (cal) unused local variables in GregorianCalendar, etc.
  • 5dd851d: 8281453: New optimization: convert ~x into -1-x when ~x is used in an arithmetic expression
  • 85569e9: 8286037: Bump minimum boot jdk to JDK 19
  • fef345b: 8293672: Update freetype md file
  • 5c030cc: 8290973: In AffineTransform, equals(Object) is inconsistent with hashCode()
  • f888aa9: 8293061: Combine CDSOptions and AppCDSOptions test utility classes
  • 73f0646: 8294839: Disable StressLongCountedLoop in compiler/loopopts/TestRemoveEmptyLoop.java
  • 2ceebf6: 8294456: Fix misleading-indentation warnings in core JDK libraries
  • ad7b7d4: 8294697: java/lang/Thread/virtual/ThreadAPI.testGetStackTrace2 failed with non-empty stack trace
  • ... and 427 more: https://git.openjdk.org/jdk/compare/bd674dc55e87940f442cb140841f95424b6d42fd...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 7, 2022
@openjdk openjdk bot closed this Oct 7, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 7, 2022
@openjdk
Copy link

openjdk bot commented Oct 7, 2022

@prsadhuk Pushed as commit f3a44a4.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@prsadhuk prsadhuk deleted the JDK-8075916 branch October 7, 2022 03:09
@mrserb
Copy link
Member

mrserb commented Oct 12, 2022

The spec for the changed method mention that the "getColorForState" should be called for the component if the app did not specify the color explicetly. Should the fix do the same instead of direct call of "UIManager.getColor"? And if it does not work should we updated the skin to include these props?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants