jfx icon indicating copy to clipboard operation
jfx copied to clipboard

8329098: Support "@1x" image naming convention as fallback

Open lukostyra opened this issue 4 months ago • 5 comments

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

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

Link to Webrev Comment

lukostyra avatar Oct 11 '24 10:10 lukostyra