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

NSColor: add AppKit-defined colors #660

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattjbray
Copy link
Contributor

Add AppKit-defined UI Element Colors and Standard Colors.

See https://developer.apple.com/documentation/appkit/nscolor#1651631

@mattjbray
Copy link
Contributor Author

Looks like quaternarySystemFillColor et al are only available on macOS 14.0+, but the tests run on os: [macos-11.0, macos-12, macos-13].

Is there any preprocessor/directive already in use to detect what version of macOS is being built against? Or should I just remove them?

@mattjbray mattjbray force-pushed the appkit-defined-colors branch from 4160e3f to c0d59c6 Compare August 13, 2024 14:54
@waywardmonkeys
Copy link
Contributor

Part of the issue here is that you're running tests that need the new symbols, but if you didn't do that, then things would compile, leaving up to the person using the crate to sort it out. I'm not sure what's better.

@mattjbray
Copy link
Contributor Author

An option is to add a macos_14 cargo feature (set by default) and disable/enable it in the test matrix. I can have a go at that if you want.

@mattjbray
Copy link
Contributor Author

There is some precedent for using cargo features:

I was thinking along the lines of how it's done in core-text: include the feature by default, and you can exclude it if building on older osx versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants