Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.selection.selectable
Expand All @@ -27,6 +28,9 @@ import com.gamss.android.core.designsystem.theme.GamssTheme
private val BottomBarHeight = 66.dp
private val ItemRowWidth = 255.dp
private val ItemRowHeight = 44.dp

// 시스템 폰트를 키워도 라벨이 잘리지 않고 위아래 여백은 디자인대로 유지해야 해서, 바 높이는 고정하지 않는다.
private val ItemRowVerticalPadding = (BottomBarHeight - ItemRowHeight) / 2
private val ItemIconSize = 26.dp
private val ItemLabelGap = 4.dp
private val BottomBarStrokeWidth = 1.dp
Expand All @@ -49,13 +53,13 @@ fun <T> GamssBottomBar(
// 화면 폭을 꽉 채우는 바라 좌우·아래 선은 화면 테두리에 붙어 버린다. 위쪽만 긋는다.
drawRect(color = strokeColor, size = Size(size.width, BottomBarStrokeWidth.toPx()))
}
.navigationBarsPadding()
.height(BottomBarHeight),
.navigationBarsPadding(),
) {
Row(
modifier = Modifier
.width(ItemRowWidth)
.height(ItemRowHeight)
.padding(vertical = ItemRowVerticalPadding)
.heightIn(min = ItemRowHeight)
.align(Alignment.Center),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private fun GamssExpandingInputBarFilledPreview() {
}

@Preview(name = "BottomBar", showBackground = true, widthDp = 402)
@Preview(name = "BottomBar fontScale 2.0", showBackground = true, widthDp = 402, fontScale = 2f)
@Composable
@Suppress("UnusedPrivateMember")
private fun GamssBottomBarPreview() {
Expand Down
Loading