-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from ptkNktq/update/compose_lib
Compose BOMの更新
- Loading branch information
Showing
8 changed files
with
90 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
31 changes: 3 additions & 28 deletions
31
AndroidApp/ui/src/main/kotlin/me/nya_n/notificationnotifier/ui/theme/Style.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,14 @@ | ||
package me.nya_n.notificationnotifier.ui.theme | ||
|
||
import androidx.compose.material.ripple.LocalRippleTheme | ||
import androidx.compose.material.ripple.RippleAlpha | ||
import androidx.compose.material.ripple.RippleTheme | ||
import androidx.compose.material3.LocalContentColor | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.CompositionLocalProvider | ||
import androidx.compose.ui.graphics.Color | ||
|
||
@Composable | ||
fun AppTheme( | ||
content: @Composable () -> Unit | ||
) { | ||
MaterialTheme( | ||
colorScheme = AppColorScheme | ||
) { | ||
CompositionLocalProvider( | ||
LocalRippleTheme provides WhiteRippleTheme, | ||
content = content | ||
) | ||
} | ||
colorScheme = AppColorScheme, | ||
content = content | ||
) | ||
} | ||
|
||
object WhiteRippleTheme : RippleTheme { | ||
@Composable | ||
override fun defaultColor(): Color { | ||
return Color.White | ||
} | ||
|
||
@Composable | ||
override fun rippleAlpha(): RippleAlpha { | ||
return RippleTheme.defaultRippleAlpha( | ||
contentColor = LocalContentColor.current, | ||
lightTheme = false // AppColorSchemeがdarkColorSchemeのみサポートしている | ||
) | ||
} | ||
} |