Jetpack Compose: Dialog confirm button cannot be styled for Material 3 apps
svenjacobs opened this issue ยท 6 comments
Since AboutLibraries for Compose is based on Material 2, the only possibility for Material 3 apps to style this library is via the colors
parameter of LibrariesContainer
. Unfortunately there is no parameter in LibraryDefaults.libraryColors()
that sets the confirm button text color.
So in LicenseDialog
the Text
composable inside TextButton
implicitly takes the color from the Material 2 MaterialTheme
CompositionLocal
which is not declared (or let's say defined with custom colors) for Material 3 apps. So we get the (ugly ๐) default purple color.
- AboutLibraries
10.9.0
That is a great report. Would you have the bandwidth to contribute a fix for this?
Thank you!
Sure, I will give it a try ๐
Thank you @svenjacobs
Going to get this into a small release. It's probably worth to consider upgrading to Material3 soon. Need to figure out how it handles compatibility for people ๐ค
Going to get this into a small release. It's probably worth to consider upgrading to Material3 soon. Need to figure out how it handles compatibility for people ๐ค
@mikepenz That's an interesting problem because a big part of your library is to provide UI components. As we have seen in this issue, even simple components like Text
are either provided and styled by M2 or M3 but not by both at the same time.
You probably have to create a new major version based on M3 and also support the previous M2 version for a while?