jfx
jfx copied to clipboard
8329098: Support "@1x" image naming convention as fallback
This PR adds a title-mentioned fallback to ImageStorage.java and a test for that specific scenario.
In ImageStorage.loadAll() we still prefer the Image path that was provided by the user, but if it is missing we will now try to add a @1x suffix to Image name and give it one last try.
Added test includes a binary file [email protected]. This was added to differentiate it from the collection of checker.png files and their higher scale variants, but it is a direct copy of already existing checker.png test resource, just with a different name and suffix. Test should fail without a change in ImageStorage.java and pass with it.
Progress
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)
Warnings
⚠️ Patch contains a binary file (modules/javafx.graphics/src/test/resources/test/com/sun/javafx/iio/lightblue.png) ⚠️ Patch contains a binary file (modules/javafx.graphics/src/test/resources/test/com/sun/javafx/iio/[email protected])
Issue
- JDK-8329098: Support "@1x" image naming convention as fallback (Enhancement - P4)
Reviewers
- Kevin Rushforth (@kevinrushforth - Reviewer) 🔄 Re-review required (review applies to fd9e877d)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1598/head:pull/1598
$ git checkout pull/1598
Update a local copy of the PR:
$ git checkout pull/1598
$ git pull https://git.openjdk.org/jfx.git pull/1598/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1598
View PR using the GUI difftool:
$ git pr show -t 1598
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1598.diff
Webrev
:wave: Welcome back lkostyra! 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.
@lukostyra 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:
8329098: Support "@1x" image naming convention as fallback
Reviewed-by: kcr, jhendrikx, mstrauss
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 18 new commits pushed to the master branch:
- e2a3074029d94e19332ffb1f1a49e94c5e3e5163: 8342462: TextAreaSkin: remove USE_MULTIPLE_NODES
- 6ac2dd3ee0d175053442fb5de1bd0e3f92175874: 8336031: Create implementation of NSAccessibilityStaticText protocol
- f5b18adfa4151a7760b146a95ecea08b2b407d39: 8337280: Include jdk.jsobject module with JavaFX
- f71c3906d5da83adb69bf55d1e2854b8891dbefe: 8340003: Bump minimum JDK version for JavaFX to JDK 22
- 77482debff0b6e550b451516b4d4d1466895fed8: 8341372: BackgroundPosition, BorderImage, BorderStroke, CornerRadii should be final
- c4b1e1c019c98e97c64df8b11ee2f9635c67256d: 8341686: FX: Update copyright year in docs, readme files to 2025
- 1c86d3b089bec1ade1e9e986ef71ec77cae7b533: 8340850: Wrong bug ID listed as reason for skipping SwingNodePlatformExitCrashTest
- 9c31cb0c696c9ec8bf71038f8f5f53633c457d04: 8340005: Eliminate native access calls from javafx.swing
- 0cafd8011b218162259b81872b1672a1a0649eef: 8341920: Intermittent WebKit build failure on Windows generating PDB files in 619.1
- cf559843d165e79167949718c15d458064ec9d2b: 8341440: ScrollPane: no immediate effect changing fitWidth/fitHeight
- ... and 8 more: https://git.openjdk.org/jfx/compare/d5432c3e14b06445bc45e34e4aa63ec415c03595...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.
Webrevs
- 03: Full - Incremental (932eed38)
- 02: Full - Incremental (96155157)
- 01: Full - Incremental (9e46931e)
- 00: Full (fd9e877d)
/reviewers 2
@kevinrushforth The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).
/integrate
Going to push as commit e128382fa305bb0a50b1f9fbb90f5237f9a0f9c5.
Since your change was applied there have been 19 commits pushed to the master branch:
- 076b4018de1a6fd659778b77d66d2478def315a3: 8341514: Add reducedMotion and reducedTransparency preferences
- e2a3074029d94e19332ffb1f1a49e94c5e3e5163: 8342462: TextAreaSkin: remove USE_MULTIPLE_NODES
- 6ac2dd3ee0d175053442fb5de1bd0e3f92175874: 8336031: Create implementation of NSAccessibilityStaticText protocol
- f5b18adfa4151a7760b146a95ecea08b2b407d39: 8337280: Include jdk.jsobject module with JavaFX
- f71c3906d5da83adb69bf55d1e2854b8891dbefe: 8340003: Bump minimum JDK version for JavaFX to JDK 22
- 77482debff0b6e550b451516b4d4d1466895fed8: 8341372: BackgroundPosition, BorderImage, BorderStroke, CornerRadii should be final
- c4b1e1c019c98e97c64df8b11ee2f9635c67256d: 8341686: FX: Update copyright year in docs, readme files to 2025
- 1c86d3b089bec1ade1e9e986ef71ec77cae7b533: 8340850: Wrong bug ID listed as reason for skipping SwingNodePlatformExitCrashTest
- 9c31cb0c696c9ec8bf71038f8f5f53633c457d04: 8340005: Eliminate native access calls from javafx.swing
- 0cafd8011b218162259b81872b1672a1a0649eef: 8341920: Intermittent WebKit build failure on Windows generating PDB files in 619.1
- ... and 9 more: https://git.openjdk.org/jfx/compare/d5432c3e14b06445bc45e34e4aa63ec415c03595...master
Your commit was automatically rebased without conflicts.
@lukostyra Pushed as commit e128382fa305bb0a50b1f9fbb90f5237f9a0f9c5.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.