Skip to content

Commit

Permalink
MONEYMONG-508 feat: MDSNavigationBar 그림자 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jhg3410 committed Sep 22, 2024
1 parent 3f32d8a commit 23bcb3c
Showing 1 changed file with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.moneymong.moneymong.design_system.component.navigation

import android.graphics.BlurMaskFilter
import androidx.annotation.DrawableRes
import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource
Expand All @@ -22,9 +21,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -33,7 +29,6 @@ import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationB
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.selectedLabelColor
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.unSelectedIconColor
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.unSelectedLabelColor
import com.moneymong.moneymong.design_system.theme.Black
import com.moneymong.moneymong.design_system.theme.Blue04
import com.moneymong.moneymong.design_system.theme.Body2
import com.moneymong.moneymong.design_system.theme.Gray02
Expand All @@ -49,7 +44,6 @@ fun MDSNavigationBar(
modifier = modifier
.fillMaxWidth()
.navigationBarsPadding()
.navigationBarShadow()
.background(color = White)
.drawBehind {
val strokeWidth = 1.dp.toPx()
Expand All @@ -66,32 +60,6 @@ fun MDSNavigationBar(
)
}

private fun Modifier.navigationBarShadow(): Modifier {
val shadowOffsetY = (-4).dp
val shadowBlurRadius = 8.dp
val shadowColor = Black.copy(alpha = 0.04f).toArgb()

return this.drawBehind {
drawIntoCanvas { canvas ->
val paint = Paint()
val frameworkPaint = paint.asFrameworkPaint()
frameworkPaint.color = shadowColor
frameworkPaint.maskFilter = BlurMaskFilter(
shadowBlurRadius.toPx(),
BlurMaskFilter.Blur.NORMAL
)

canvas.drawRect(
left = 0f,
top = shadowOffsetY.toPx(),
right = size.width,
bottom = size.height + shadowOffsetY.toPx(),
paint = paint
)
}
}
}


@Composable
fun RowScope.MDSNavigationBarItem(
Expand Down

0 comments on commit 23bcb3c

Please sign in to comment.