Remove deprecations
This commit is contained in:
1 parent
8716a80c30
commit
b5b0202141
2 files changed
-57
No files matched your search
@@ -2,8 +2,6 @@ package com.kyant.backdrop.highlight
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.ui.graphics.BlendMode
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.lerp
|
||||
@@ -17,21 +15,6 @@ data class Highlight(
|
||||
val style: HighlightStyle = HighlightStyle.Default
|
||||
) {
|
||||
|
||||
@Deprecated(message = "Use the non-lambda version of style parameter")
|
||||
constructor(
|
||||
width: Dp = 0.5f.dp,
|
||||
blurRadius: Dp = width / 2f,
|
||||
color: Color = Color.White.copy(alpha = 0.5f),
|
||||
alpha: Float = 1f,
|
||||
blendMode: BlendMode = BlendMode.Plus,
|
||||
style: () -> HighlightStyle
|
||||
) : this(
|
||||
width = width,
|
||||
blurRadius = blurRadius,
|
||||
alpha = alpha,
|
||||
style = style()
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
||||
@Stable
|
||||
|
||||
@@ -34,23 +34,6 @@ interface HighlightStyle {
|
||||
shaderCache: RuntimeShaderCacheScope
|
||||
): RenderEffect?
|
||||
|
||||
@Deprecated(
|
||||
message = "Use HighlightStyle.Plain instead",
|
||||
replaceWith = ReplaceWith("HighlightStyle.Plain")
|
||||
)
|
||||
data object Solid : HighlightStyle {
|
||||
|
||||
override val color: Color = Color.White.copy(alpha = 0.38f)
|
||||
|
||||
override val blendMode: BlendMode = BlendMode.Plus
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
override fun DrawScope.createRenderEffect(
|
||||
shape: Shape,
|
||||
shaderCache: RuntimeShaderCacheScope
|
||||
): RenderEffect? = null
|
||||
}
|
||||
|
||||
@Immutable
|
||||
data class Plain(
|
||||
override val color: Color = Color.White.copy(alpha = 0.38f),
|
||||
@@ -64,22 +47,6 @@ interface HighlightStyle {
|
||||
): RenderEffect? = null
|
||||
}
|
||||
|
||||
@Deprecated(
|
||||
message = "Use HighlightStyle.Default instead",
|
||||
replaceWith = ReplaceWith("HighlightStyle.Default")
|
||||
)
|
||||
data class Dynamic(
|
||||
override val color: Color = Color.White.copy(alpha = 0.5f),
|
||||
override val blendMode: BlendMode = BlendMode.Plus,
|
||||
val angle: Float = 45f,
|
||||
@param:FloatRange(from = 0.0) val falloff: Float = 1f
|
||||
) : HighlightStyle by Default(
|
||||
color = color,
|
||||
blendMode = blendMode,
|
||||
angle = angle,
|
||||
falloff = falloff
|
||||
)
|
||||
|
||||
@Immutable
|
||||
data class Default(
|
||||
override val color: Color = Color.White.copy(alpha = 0.5f),
|
||||
@@ -141,13 +108,6 @@ interface HighlightStyle {
|
||||
@Stable
|
||||
val Default: Default = Default()
|
||||
|
||||
@Deprecated(
|
||||
message = "Use HighlightStyle.Default instead",
|
||||
replaceWith = ReplaceWith("HighlightStyle.Default")
|
||||
)
|
||||
@Stable
|
||||
val Dynamic: Dynamic = Dynamic()
|
||||
|
||||
@Stable
|
||||
val Ambient: Ambient = Ambient()
|
||||
|
||||
|
||||
Reference in new issue
Block a user