Fix DefaultColorFilter
This commit is contained in:
1 parent
aed978a04a
commit
aa4dbdf592
3 files changed
+5
-3
No files matched your search
Binary file not shown.
@@ -39,6 +39,9 @@ data class GlassMaterial(
|
||||
|
||||
companion object {
|
||||
|
||||
@Stable
|
||||
val DefaultColorFilter: ColorFilter = simpleColorFilter(contrast = 1.5f, saturation = 1.5f)
|
||||
|
||||
@Stable
|
||||
val Default: GlassMaterial = GlassMaterial()
|
||||
|
||||
@@ -48,8 +51,5 @@ data class GlassMaterial(
|
||||
blurRadius = 0.dp,
|
||||
colorFilter = null
|
||||
)
|
||||
|
||||
@Stable
|
||||
val DefaultColorFilter: ColorFilter = simpleColorFilter(contrast = 1.5f, saturation = 1.5f)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.kyant.liquidglass.material
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.ColorMatrix
|
||||
import androidx.compose.ui.graphics.ColorMatrixColorFilter
|
||||
@@ -12,6 +13,7 @@ fun saturationColorFilter(saturation: Float): ColorFilter {
|
||||
return ColorFilter.colorMatrix(ColorMatrix().apply { setToSaturation(saturation) })
|
||||
}
|
||||
|
||||
@Stable
|
||||
fun simpleColorFilter(
|
||||
brightness: Float = 1f,
|
||||
contrast: Float = 1f,
|
||||
|
||||
Reference in new issue
Block a user