Create NotificationScreen

This commit is contained in:
vfsfitvnm
2022-06-11 18:57:32 +02:00
parent baea3d252c
commit afc64cae74
10 changed files with 277 additions and 21 deletions

View File

@@ -0,0 +1,29 @@
package it.vfsfitvnm.vimusic.utils
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.*
import androidx.compose.ui.graphics.drawscope.DrawScope
fun DrawScope.drawCircle(
color: Color,
shadow: Shadow,
radius: Float = size.minDimension / 2.0f,
center: Offset = this.center,
alpha: Float = 1.0f,
style: PaintingStyle = PaintingStyle.Fill,
colorFilter: ColorFilter? = null,
blendMode: BlendMode = DrawScope.DefaultBlendMode
) = drawContext.canvas.nativeCanvas.drawCircle(
center.x,
center.y,
radius,
Paint().also {
it.color = color
it.alpha = alpha
it.blendMode = blendMode
it.colorFilter = colorFilter
it.style = style
}.asFrameworkPaint().also {
it.setShadowLayer(shadow.blurRadius, shadow.offset.x, shadow.offset.y, shadow.color.toArgb())
}
)

View File

@@ -23,6 +23,7 @@ class Preferences(holder: SharedPreferences) : SharedPreferences by holder {
var homePageSongCollection by preference("homePageSongCollection", SongCollection.MostPlayed)
var thumbnailRoundness by preference("thumbnailRoundness", ThumbnailRoundness.Light)
var coilDiskCacheMaxSizeBytes by preference("coilDiskCacheMaxSizeBytes", 512L * 1024 * 1024)
var displayLikeButtonInNotification by preference("displayLikeButtonInNotification", false)
}
val Context.preferences: Preferences