Skip to content

Commit

Permalink
[UI/#15] 언덕 Radius 및 위치 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
DongChyeon committed Jan 22, 2025
1 parent ed6c94d commit f590e28
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions feature/home/src/main/java/com/yapp/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
Expand All @@ -54,6 +55,7 @@ import com.yapp.designsystem.theme.OrbitTheme
import com.yapp.ui.component.lottie.LottieAnimation
import com.yapp.ui.lifecycle.LaunchedEffectWithLifecycle
import com.yapp.ui.utils.heightForScreenPercentage
import com.yapp.ui.utils.toPx
import feature.home.R

@Composable
Expand Down Expand Up @@ -116,9 +118,11 @@ private fun HomeContent(state: HomeContract.State) {

SkyImage()

val characterY = (LocalConfiguration.current.screenHeightDp.dp * 0.28f) - 130.dp

HomeCharacterAnimation(
modifier = Modifier
.offset(y = 80.dp)
.offset(y = characterY)
.align(Alignment.TopCenter),
fortuneScore = state.lastFortuneScore,
)
Expand Down Expand Up @@ -198,14 +202,15 @@ private fun HomeTopBar(

@Composable
fun HillWithGradient() {
val hillTopY = (LocalConfiguration.current.screenHeightDp.dp * 0.28f).toPx()

Canvas(
modifier = Modifier.fillMaxSize(),
) {
val canvasWidth = size.width
val canvasHeight = size.height
val hillTopY = 210.dp.toPx()

val circleRadius = canvasWidth / 1f
val circleRadius = canvasWidth / 0.8f

val gradientBrush = Brush.verticalGradient(
colors = listOf(
Expand Down

0 comments on commit f590e28

Please sign in to comment.