[pull] develop from mikepenz:develop - #20
Merged
Merged
Conversation
Co-authored-by: renovate-mike[bot] <274037420+renovate-mike[bot]@users.noreply.github.com>
…riant colors
Since v15 the license chips in the Traditional row are colored per license via
the `LicenseHueResolver` — a tinted background with a matching label. There was
no way to opt out into a single fixed color pair: `LicenseHueResolver.None` fell
back to `actionFilledContainer` at the badge alpha while the label used
`actionFilledContent` (e.g. `onPrimary`), which is unreadable on the tint.
Adds two opt-in tokens to `VariantColors`, both defaulting to
`Color.Unspecified` so the dynamic behavior is unchanged. Setting them together
with `LicenseHueResolver.None` restores the v14 look (solid `primary` chip with
`onPrimary` label):
variantColors = LibraryDefaults.m3VariantColors(
licenseHueResolver = LicenseHueResolver.None,
licenseBadgeContainer = MaterialTheme.colorScheme.primary,
licenseBadgeContent = MaterialTheme.colorScheme.onPrimary,
)
- threaded through `defaultVariantColors`, `m2VariantColors`, `m3VariantColors`
- `PreviewLibrariesStaticLicenseChips` screenshot tests for M2 and M3
- README: "Static license chip colors" section
- MIGRATION.md: `colors: LibraryColors` only styles the license dialog in v15 —
it no longer feeds the list rows, which is what the previous wording implied
Note: the mangled names of the `*VariantColors` factories change, so this is
binary-breaking for those functions (source-compatible).
Relates to #1434
feat(compose): add `licenseBadgeContainer` / `licenseBadgeContent` variant colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )