RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2]
Harshitha Onkar
honkar at openjdk.java.net
Wed Jun 1 19:40:34 UTC 2022
> With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes.
>
> While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists.
>
> Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243)
>
> #### Summary of changes
>
> - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables
> - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability
> - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java`
> - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists.
>
> **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_
>
> 
Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
removed redundant null checks in test
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8896/files
- new: https://git.openjdk.java.net/jdk/pull/8896/files/54e54719..e98484fe
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8896&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8896&range=00-01
Stats: 110 lines in 2 files changed: 40 ins; 55 del; 15 mod
Patch: https://git.openjdk.java.net/jdk/pull/8896.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8896/head:pull/8896
PR: https://git.openjdk.java.net/jdk/pull/8896
More information about the client-libs-dev
mailing list