Skip to content

Commit

Permalink
일부 디자인 디테일 잡기 (#55)
Browse files Browse the repository at this point in the history
* refactor : Embed padding within dialog component for consistency

* refactor : bubble detail

* feat : FillBounds -> Crop
  • Loading branch information
nohjunh authored Feb 4, 2025
1 parent e22f5bf commit f68f815
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ private fun Path.drawBubbleTail(
// 꼬리 오른쪽 부분 그리기
relativeCubicTo(
dx1 = -13.dp.toPx(),
dy1 = 5.dp.toPx(),
dx2 = 7.dp.toPx(),
dy1 = 10.dp.toPx(),
dx2 = 8.dp.toPx(),
dy2 = 24.dp.toPx(),
dx3 = -11.dp.toPx(),
dx3 = -8.dp.toPx(),
dy3 = tailHeight,
)

Expand All @@ -138,9 +138,9 @@ private fun Path.drawBubbleTail(
// 꼬리 왼쪽 부분 그리기
cubicTo(
x1 = x - 14.dp.toPx(),
y1 = y - 4.dp.toPx(),
y1 = y - 8.dp.toPx(),
x2 = x - 9.dp.toPx(),
y2 = height + 3.dp.toPx(),
y2 = height + 2.dp.toPx(),
x3 = tailStartX,
y3 = height,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ fun DobeDobeDialog(
properties = properties,
) {
Surface(
modifier = modifier,
modifier = modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
shape = RoundedCornerShape(16.dp),
color = DobeDobeTheme.colors.white,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.animation.core.AnimationVector1D
import androidx.compose.animation.core.tween
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.CircularProgressIndicator
Expand Down Expand Up @@ -307,9 +306,6 @@ private fun GoalNotificationPermission(
notificationsPermissionState.launchPermissionRequest()
showGoalNotificationDialog = false
},
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private fun SharedTransitionScope.CollapsedPhotoFrame(
.rotate(rotation)
.clip(RoundedCornerShape(24.dp))
.clickable(onClick = onToggleExpansion),
contentScale = ContentScale.FillBounds,
contentScale = ContentScale.Crop,
model = uri,
contentDescription = null,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal fun SharedTransitionScope.DashboardViewMode(
.fillMaxSize()
.paint(
painterResource(id = R.drawable.rabbit_sheet_content_background),
contentScale = ContentScale.FillBounds,
contentScale = ContentScale.Crop,
),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal fun EditModePhotoFrame(
modifier = Modifier
.fillMaxSize()
.clickable(onClick = onDeletePhoto),
contentScale = ContentScale.FillBounds,
contentScale = ContentScale.Crop,
model = uri,
contentDescription = "photo",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private fun SharedTransitionScope.ExpandedPhotoFrame(
)
.rotate(rotation)
.clip(RoundedCornerShape(16.dp)),
contentScale = ContentScale.FillBounds,
contentScale = ContentScale.Crop,
model = targetState.uri,
contentDescription = "expanded photo",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ private fun DetailGoalContent(
visible = visibleDialog,
onConfirm = onConfirmDialog,
onDismiss = onDismissDialog,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
)
}

Expand Down Expand Up @@ -252,9 +249,6 @@ private fun DeleteDialogPreview() {
visible = true,
onConfirm = {},
onDismiss = {},
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
)
}
}
Expand Down

0 comments on commit f68f815

Please sign in to comment.