Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonnickel/fb13310835-swiftuimacoslisthighlight
https://github.com/simonnickel/fb13310835-swiftuimacoslisthighlight
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/simonnickel/fb13310835-swiftuimacoslisthighlight
- Owner: simonnickel
- Created: 2023-10-29T12:13:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-08T11:52:27.000Z (9 months ago)
- Last Synced: 2024-12-16T16:06:20.208Z (about 1 month ago)
- Language: Swift
- Size: 79.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FB13310835 - SwiftUI macOS: Highlighted row in a list should be available.
## Response from Apple
The environment value backgroundProminence (https://developer.apple.com/documentation/swiftui/environmentvalues/backgroundprominence) should be used to change color accordingly instead of relying on the selection value.
Provided example is in ContentReviewResponse.swift
## Scenario
There is a selectable list, which has some design adjustments based on the selected state.
MacOS adds a colored background to the highlighted row.## The Issue
The selection is only applied on mouse up, but the row is already highlighted on mouse down.
It is not possible to detect wheather the row is highlighted or not.![screenshot](./screenshot.png)
## Suggestion
Add a highlighted binding just like the selected binding.
## Example Code
The example contains selectable List. When clicking on a list item, it is highlighted (colored background) before it gets selected (adjusted font color).
## Tested on
- macOS 14.0