Skip to content

Commit ce0eb17

Browse files
committed
Chore: 화면 비율 및 네이밍 수정
1 parent 4b9d40d commit ce0eb17

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

data/src/main/java/com/threegap/bitnagil/data/auth/mapper/AuthMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal fun LoginResponseDto.toDomain() =
1111
AuthSession(
1212
accessToken = this.accessToken,
1313
refreshToken = this.refreshToken,
14-
role = UserRole.from(this.role),
14+
role = UserRole.fromString(this.role),
1515
)
1616

1717
// toDto

domain/src/main/java/com/threegap/bitnagil/domain/auth/model/UserRole.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ enum class UserRole {
88
fun isGuest() = this == GUEST
99

1010
companion object {
11-
fun from(value: String): UserRole =
11+
fun fromString(value: String): UserRole =
1212
when (value) {
1313
"USER" -> USER
1414
"GUEST" -> GUEST

presentation/src/main/java/com/threegap/bitnagil/presentation/intro/IntroScreen.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
1010
import androidx.compose.foundation.layout.height
1111
import androidx.compose.foundation.layout.padding
1212
import androidx.compose.foundation.layout.statusBarsPadding
13+
import androidx.compose.foundation.layout.width
1314
import androidx.compose.material3.Text
1415
import androidx.compose.runtime.Composable
1516
import androidx.compose.ui.Alignment
@@ -56,6 +57,10 @@ private fun IntroScreen(
5657
val screenHeight = with(LocalDensity.current) {
5758
windowInfo.containerSize.height.toDp()
5859
}
60+
val screenWidth = with(LocalDensity.current) {
61+
windowInfo.containerSize.width.toDp()
62+
}
63+
val widthRatio = 260f / 360f
5964

6065
Column(
6166
horizontalAlignment = Alignment.CenterHorizontally,
@@ -64,24 +69,26 @@ private fun IntroScreen(
6469
.statusBarsPadding()
6570
.background(BitnagilTheme.colors.white),
6671
) {
67-
Spacer(modifier = Modifier.height(screenHeight * 0.0748f))
72+
Spacer(modifier = Modifier.height(screenHeight * 0.105f))
6873

6974
Text(
7075
text = "당신의 하루 리듬을 이해하고,\n작은 변화를 함께 시작해볼게요.",
7176
color = BitnagilTheme.colors.navy500,
7277
style = BitnagilTheme.typography.title2Bold,
7378
textAlign = TextAlign.Center,
74-
modifier = Modifier.fillMaxWidth(),
79+
modifier = Modifier
80+
.fillMaxWidth()
81+
.height(60.dp),
7582
)
7683

77-
Spacer(modifier = Modifier.height(screenHeight * 0.151f))
84+
Spacer(modifier = Modifier.height(screenHeight * 0.136f))
7885

7986
Image(
8087
painter = painterResource(R.drawable.intro_character),
8188
contentDescription = null,
8289
contentScale = ContentScale.Fit,
8390
modifier = Modifier
84-
.padding(50.dp)
91+
.width(screenWidth * widthRatio)
8592
.aspectRatio(260f / 295f),
8693
)
8794

presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
1212
import androidx.compose.foundation.layout.height
1313
import androidx.compose.foundation.layout.padding
1414
import androidx.compose.foundation.layout.statusBarsPadding
15+
import androidx.compose.foundation.layout.width
1516
import androidx.compose.foundation.shape.RoundedCornerShape
1617
import androidx.compose.material3.Text
1718
import androidx.compose.runtime.Composable
@@ -72,6 +73,10 @@ private fun LoginScreen(
7273
val screenHeight = with(LocalDensity.current) {
7374
windowInfo.containerSize.height.toDp()
7475
}
76+
val screenWidth = with(LocalDensity.current) {
77+
windowInfo.containerSize.width.toDp()
78+
}
79+
val widthRatio = 260f / 360f
7580

7681
Column(
7782
horizontalAlignment = Alignment.CenterHorizontally,
@@ -80,24 +85,26 @@ private fun LoginScreen(
8085
.statusBarsPadding()
8186
.background(BitnagilTheme.colors.white),
8287
) {
83-
Spacer(modifier = Modifier.height(screenHeight * 0.0748f))
88+
Spacer(modifier = Modifier.height(screenHeight * 0.105f))
8489

8590
Text(
8691
text = "빛나길에 오신걸 환영해요!",
8792
color = BitnagilTheme.colors.navy500,
8893
style = BitnagilTheme.typography.title2Bold,
8994
textAlign = TextAlign.Center,
90-
modifier = Modifier.fillMaxWidth(),
95+
modifier = Modifier
96+
.fillMaxWidth()
97+
.height(60.dp),
9198
)
9299

93-
Spacer(modifier = Modifier.height(screenHeight * 0.185f))
100+
Spacer(modifier = Modifier.height(screenHeight * 0.136f))
94101

95102
Image(
96103
painter = painterResource(R.drawable.intro_character),
97104
contentDescription = null,
98105
contentScale = ContentScale.Fit,
99106
modifier = Modifier
100-
.padding(50.dp)
107+
.width(screenWidth * widthRatio)
101108
.aspectRatio(260f / 295f),
102109
)
103110

0 commit comments

Comments
 (0)