Skip to content

Commit 6748f01

Browse files
committed
다크모드 적용 (#145)
* 컬러 팔레트 추가 및 약간의 리팩토링 * SikshaTheme 새로 만들기 * SikshaColors를 SikshaTheme.colors로 수정 * Sementic Color 추가 * color.xml 정리 * FilterDialogFragment와 필터 칩 색 수정 * fix typo * 불필요한 파일 삭제 * 하트 색 변경 * 커뮤니티 PostListScreen 색 조정 * 커뮤니티 PostDetainScreen 색 조정 * 기본 topbar(?) 색 변경 * 식샤 topbar 색 조정 및 여백 수정 * 설정 메인화면 색 리팩 * VocFragment 리팩 * 커뮤니티탭 아이콘 색 변경 * 하단바 아이콘 수정 * 하단바 리팩 * viewpager 영역 수정 * PostCreateScreen 색상 수정 * UserProfileFragment 색 수정 * 내 글 보기와 전체 게시글 보기 수정 * 게시글 삭제 dialog 색 수정 * LeaveReviewFragment 색 수정 * 상단바 색 수정 * 구글 로그인 버튼 색 수정 * ReorderRestaurantFragment 상단바 수정 * PostListFragment 수정 * MenuDetailFragment 중 간단한 수정 * 별점 바 길이 조정, divider 길이 조절 * 리뷰화면 날짜, 글자 색 수정 * 리뷰 말풍선 색 수정 * LeaveReviewFragment QA 반영 * UserProfileFragment QA 반영 * SettingFragment QA 반영 * PostDetailFragment QA 반영 * DailyRestaurantFragment QA 반영 * DailyRestaurantFragment 새 디자인 적용 * 달력 선택된 글자 볼드 처리 * DailyRestaurantFragment 리팩 완료 및 파일 정리 * RestaurantInfoBottomSheet 화면 꽉 채우기 * string resource 사용하도록 변경 * 사소한 오류 수정 * RestaurantInfoBottomSheet 디자인 변경 반영 (지도 제외) * mapview 디자인 반영 * MenuDetailFragment 디자인 수정 + 컴포저블 업데이트 수정 * ReviewFragment, ReviewPhotoFragment 디자인 수정 * PostCreateScreen 디자인 수정 * DailyRestaurantFragment 수정 * FilterDialogFragment 수정 * CommentDetailDialog 수정 * PostListScreen 수정 * ProfileImageDialog 수정 * SettingFragment, UserAccountFragment 수정 * 색상 간단한 수정... * 아이콘 교체 * 필터가 사라지는 스크롤 구현 (menuGroupList 빌 시 오류) * 필터가 사라지는 스크롤 구현 * setContent 한 번만 하도록 수정 * 배경색 수정... (cherry picked from commit 35d3100)
1 parent 13d84a6 commit 6748f01

File tree

183 files changed

+2346
-1376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+2346
-1376
lines changed

app/src/main/java/com/wafflestudio/siksha2/components/CalendarSelectView.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.util.AttributeSet
55
import android.view.*
66
import android.widget.LinearLayout
77
import androidx.core.content.ContextCompat
8+
import androidx.core.content.res.ResourcesCompat
89
import androidx.recyclerview.widget.LinearLayoutManager
910
import androidx.recyclerview.widget.RecyclerView
1011
import com.wafflestudio.siksha2.R
@@ -207,15 +208,18 @@ class CalendarSelectView : LinearLayout {
207208
) {
208209
setBackgroundResource(R.drawable.frame_day_select)
209210
setTextColor(ContextCompat.getColor(context, R.color.white))
211+
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_bold)
210212
} else if (today.year == year &&
211213
today.monthValue == month &&
212214
today.dayOfMonth == data
213215
) {
214216
setBackgroundResource(R.drawable.frame_day_today)
215217
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
218+
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_regular)
216219
} else {
217220
setBackgroundColor(ContextCompat.getColor(context, R.color.transparent))
218221
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
222+
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_regular)
219223
}
220224
setOnClickListener {
221225
updateDate(LocalDate.of(year, month, data))

app/src/main/java/com/wafflestudio/siksha2/components/SettingItemRow.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import android.util.AttributeSet
55
import android.view.Gravity
66
import android.view.LayoutInflater
77
import android.widget.LinearLayout
8-
import androidx.compose.ui.graphics.Color
8+
import androidx.core.content.ContextCompat
99
import com.wafflestudio.siksha2.R
1010
import com.wafflestudio.siksha2.databinding.ItemSettingRowBinding
11-
import com.wafflestudio.siksha2.utils.dp
1211
import com.wafflestudio.siksha2.utils.setVisibleOrGone
1312

1413
class SettingItemRow : LinearLayout {
@@ -58,9 +57,6 @@ class SettingItemRow : LinearLayout {
5857
private fun init(attr: AttributeSet?) {
5958
gravity = Gravity.CENTER_VERTICAL
6059
orientation = HORIZONTAL
61-
val dp18 = context.dp(18)
62-
val dp24 = context.dp(24)
63-
setPadding(dp24, dp18, dp24, dp18)
6460

6561
context.theme.obtainStyledAttributes(
6662
attr,
@@ -73,9 +69,7 @@ class SettingItemRow : LinearLayout {
7369
setNewIcon(getBoolean(R.styleable.SettingItem_showNewIcon, false))
7470
setShowCheckbox(getBoolean(R.styleable.SettingItem_showCheckbox, false))
7571
binding.settingRowText.text = getString(R.styleable.SettingItem_itemText)
76-
77-
val textColor = getColor(R.styleable.SettingItem_textColor, Color.DarkGray.hashCode())
78-
binding.settingRowText.setTextColor(textColor)
72+
binding.settingRowText.setTextColor(context.obtainStyledAttributes(attr, R.styleable.SettingItem).getColor(R.styleable.SettingItem_textColor, ContextCompat.getColor(context, R.color.black)))
7973
} finally {
8074
recycle()
8175
}

app/src/main/java/com/wafflestudio/siksha2/components/compose/Chip.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ import androidx.compose.runtime.Composable
1212
import androidx.compose.runtime.remember
1313
import androidx.compose.ui.Modifier
1414
import androidx.compose.ui.draw.clip
15+
import androidx.compose.ui.text.font.FontWeight
1516
import androidx.compose.ui.tooling.preview.Preview
1617
import androidx.compose.ui.unit.dp
17-
import com.wafflestudio.siksha2.ui.SikshaColors
18+
import com.wafflestudio.siksha2.ui.SikshaTheme
1819
import com.wafflestudio.siksha2.ui.SikshaTypography
1920

2021
@Composable
@@ -28,16 +29,17 @@ fun Chip(
2829
text = text,
2930
modifier = modifier
3031
.clip(RoundedCornerShape(12.dp))
31-
.background(if (selected) SikshaColors.OrangeMain else SikshaColors.Gray100)
32+
.background(if (selected) SikshaTheme.colors.Orange500 else SikshaTheme.colors.Gray100)
3233
.padding(horizontal = 12.dp, vertical = 9.dp)
3334
.clickable(
3435
indication = null,
3536
interactionSource = remember { MutableInteractionSource() }
3637
) {
3738
onClick()
3839
},
39-
color = if (selected) SikshaColors.White900 else SikshaColors.Gray400,
40-
style = SikshaTypography.body1
40+
color = if (selected) SikshaTheme.colors.TextButton else SikshaTheme.colors.Gray600,
41+
style = SikshaTypography.body1,
42+
fontWeight = FontWeight.Bold
4143
)
4244
}
4345

@@ -46,7 +48,7 @@ fun Chip(
4648
fun ChipPreview() {
4749
Row(
4850
modifier = Modifier
49-
.background(SikshaColors.White900)
51+
.background(SikshaTheme.colors.White)
5052
.padding(20.dp),
5153
horizontalArrangement = Arrangement.spacedBy(10.dp)
5254
) {

app/src/main/java/com/wafflestudio/siksha2/components/compose/CommentIconWithCount.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
99
import androidx.compose.ui.unit.dp
1010
import androidx.compose.ui.unit.sp
1111
import com.wafflestudio.siksha2.ui.CommentIcon
12-
import com.wafflestudio.siksha2.ui.SikshaColors
12+
import com.wafflestudio.siksha2.ui.SikshaTheme
1313
import com.wafflestudio.siksha2.ui.SikshaTypography
1414

1515
// TODO: 더 좋은 이름 찾기
@@ -27,7 +27,7 @@ fun CommentIconWithCount(
2727
Text(
2828
text = commentCount.toString(),
2929
fontSize = 10.sp,
30-
color = SikshaColors.Gray600,
30+
color = SikshaTheme.colors.Gray700,
3131
style = SikshaTypography.body2
3232
)
3333
}

app/src/main/java/com/wafflestudio/siksha2/components/compose/LikeIconWithCount.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import androidx.compose.ui.Alignment
88
import androidx.compose.ui.Modifier
99
import androidx.compose.ui.unit.dp
1010
import androidx.compose.ui.unit.sp
11-
import com.wafflestudio.siksha2.ui.SikshaColors
11+
import com.wafflestudio.siksha2.ui.SikshaTheme
1212
import com.wafflestudio.siksha2.ui.SikshaTypography
1313
import com.wafflestudio.siksha2.ui.ThumbIcon
1414

@@ -28,7 +28,7 @@ fun LikeIconWithCount(
2828
Text(
2929
text = likeCount.toString(),
3030
fontSize = 10.sp,
31-
color = SikshaColors.OrangeMain,
31+
color = SikshaTheme.colors.Orange500,
3232
style = SikshaTypography.body2
3333
)
3434
}

app/src/main/java/com/wafflestudio/siksha2/components/compose/PostListItem.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import androidx.compose.ui.text.style.TextOverflow
1818
import androidx.compose.ui.tooling.preview.Preview
1919
import androidx.compose.ui.unit.dp
2020
import coil.compose.SubcomposeAsyncImage
21-
import com.wafflestudio.siksha2.ui.SikshaColors
2221
import com.wafflestudio.siksha2.ui.SikshaTheme
2322
import com.wafflestudio.siksha2.ui.SikshaTypography
2423

@@ -35,6 +34,7 @@ fun PostListItem(
3534
) {
3635
Row(
3736
modifier = modifier
37+
.background(SikshaTheme.colors.BackgroundPrimary)
3838
.clickable {
3939
onClick()
4040
}
@@ -50,13 +50,15 @@ fun PostListItem(
5050
fontWeight = FontWeight.Bold,
5151
style = SikshaTypography.body2,
5252
maxLines = 1,
53-
overflow = TextOverflow.Ellipsis
53+
overflow = TextOverflow.Ellipsis,
54+
color = SikshaTheme.colors.Black
5455
)
5556
Text(
5657
text = content,
5758
style = SikshaTypography.body2,
5859
maxLines = 1,
59-
overflow = TextOverflow.Ellipsis
60+
overflow = TextOverflow.Ellipsis,
61+
color = SikshaTheme.colors.Gray900
6062
)
6163
Row(
6264
horizontalArrangement = Arrangement.spacedBy(10.dp)
@@ -78,7 +80,7 @@ fun PostListItem(
7880
.size(61.dp),
7981
contentDescription = "",
8082
loading = {
81-
Box(modifier = Modifier.background(SikshaColors.Gray350))
83+
Box(modifier = Modifier.background(SikshaTheme.colors.Gray400))
8284
},
8385
contentScale = ContentScale.Crop
8486
)

app/src/main/java/com/wafflestudio/siksha2/components/compose/TopBar.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.Box
55
import androidx.compose.foundation.layout.fillMaxWidth
66
import androidx.compose.foundation.layout.height
77
import androidx.compose.foundation.layout.padding
8-
import androidx.compose.material.MaterialTheme
98
import androidx.compose.material.Text
109
import androidx.compose.runtime.Composable
1110
import androidx.compose.ui.Alignment
@@ -14,7 +13,6 @@ import androidx.compose.ui.text.font.FontWeight
1413
import androidx.compose.ui.tooling.preview.Preview
1514
import androidx.compose.ui.unit.dp
1615
import com.wafflestudio.siksha2.ui.NavigateUpIcon
17-
import com.wafflestudio.siksha2.ui.SikshaColors
1816
import com.wafflestudio.siksha2.ui.SikshaTheme
1917
import com.wafflestudio.siksha2.ui.SikshaTypography
2018

@@ -28,12 +26,12 @@ fun TopBar(
2826
modifier = modifier
2927
.height(56.dp)
3028
.fillMaxWidth()
31-
.background(MaterialTheme.colors.primary)
29+
.background(SikshaTheme.colors.BackgroundGNB)
3230
) {
3331
Text(
3432
text = title,
3533
modifier = Modifier.align(Alignment.Center),
36-
color = SikshaColors.White900,
34+
color = SikshaTheme.colors.TextGNB,
3735
fontWeight = FontWeight.ExtraBold,
3836
style = SikshaTypography.subtitle1
3937
)

app/src/main/java/com/wafflestudio/siksha2/components/festival/FestivalToggle.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import androidx.compose.ui.unit.IntOffset
2929
import androidx.compose.ui.unit.dp
3030
import androidx.compose.ui.unit.sp
3131
import com.wafflestudio.siksha2.R
32-
import com.wafflestudio.siksha2.ui.SikshaColors
32+
import com.wafflestudio.siksha2.ui.SikshaTheme
3333
import kotlin.math.roundToInt
3434

3535
@Composable
@@ -89,7 +89,7 @@ fun FestivalToggle(
8989
modifier = Modifier.align(Alignment.CenterStart)
9090
.offset { IntOffset(textState.roundToInt(), 0) },
9191
text = "축제",
92-
color = SikshaColors.White900,
92+
color = SikshaTheme.colors.White,
9393
fontSize = 11.sp,
9494
fontWeight = FontWeight.Bold
9595
)

app/src/main/java/com/wafflestudio/siksha2/compose/ui/community/CommentDetailDialog.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import androidx.compose.ui.tooling.preview.Preview
1919
import androidx.compose.ui.unit.dp
2020
import androidx.compose.ui.unit.sp
2121
import androidx.compose.ui.window.Dialog
22-
import com.wafflestudio.siksha2.ui.SikshaColors
22+
import com.wafflestudio.siksha2.ui.SikshaTheme
2323

2424
@Composable
2525
fun CommentDetailDialog(
@@ -33,7 +33,7 @@ fun CommentDetailDialog(
3333
Column(
3434
horizontalAlignment = Alignment.CenterHorizontally,
3535
modifier = Modifier
36-
.background(color = SikshaColors.White900, shape = RoundedCornerShape(26.dp))
36+
.background(color = SikshaTheme.colors.White, shape = RoundedCornerShape(26.dp))
3737
) {
3838
if (isMine) {
3939
Box(
@@ -55,7 +55,7 @@ fun CommentDetailDialog(
5555
}
5656
Divider(
5757
modifier = Modifier.padding(horizontal = 11.dp),
58-
color = Color(0xFFE0E0E0),
58+
color = SikshaTheme.colors.BorderPrimary,
5959
thickness = 1.dp
6060
)
6161
}
@@ -79,7 +79,7 @@ fun CommentDetailDialog(
7979
}
8080
Divider(
8181
modifier = Modifier.padding(horizontal = 11.dp),
82-
color = Color(0xFFE0E0E0),
82+
color = SikshaTheme.colors.BorderPrimary,
8383
thickness = 1.dp
8484
)
8585
}

app/src/main/java/com/wafflestudio/siksha2/compose/ui/community/CommentEditText.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ import androidx.compose.runtime.remember
1818
import androidx.compose.ui.Alignment
1919
import androidx.compose.ui.Modifier
2020
import androidx.compose.ui.graphics.Brush
21-
import androidx.compose.ui.graphics.Color
2221
import androidx.compose.ui.graphics.SolidColor
2322
import androidx.compose.ui.text.TextLayoutResult
2423
import androidx.compose.ui.text.TextStyle
2524
import androidx.compose.ui.text.input.VisualTransformation
2625
import androidx.compose.ui.unit.dp
27-
import com.wafflestudio.siksha2.ui.SikshaColors
26+
import com.wafflestudio.siksha2.ui.SikshaTheme
2827

2928
@Composable
3029
fun CommentEditText(
@@ -36,7 +35,7 @@ fun CommentEditText(
3635
trailingIcon: @Composable () -> Unit = {},
3736
enabled: Boolean = true,
3837
readOnly: Boolean = false,
39-
textStyle: TextStyle = TextStyle.Default,
38+
textStyle: TextStyle = TextStyle.Default.copy(SikshaTheme.colors.Gray900),
4039
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
4140
keyboardActions: KeyboardActions = KeyboardActions.Default,
4241
singleLine: Boolean = false,
@@ -45,7 +44,7 @@ fun CommentEditText(
4544
visualTransformation: VisualTransformation = VisualTransformation.None,
4645
onTextLayout: (TextLayoutResult) -> Unit = {},
4746
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
48-
cursorBrush: Brush = SolidColor(Color.Black)
47+
cursorBrush: Brush = SolidColor(SikshaTheme.colors.Black)
4948
) {
5049
BasicTextField(
5150
value = value,
@@ -67,7 +66,7 @@ fun CommentEditText(
6766
Row(
6867
modifier = Modifier
6968
.background(
70-
color = SikshaColors.Gray100,
69+
color = SikshaTheme.colors.Gray100,
7170
shape = RoundedCornerShape(8.dp)
7271
)
7372
.height(IntrinsicSize.Min),
@@ -86,7 +85,7 @@ fun CommentEditText(
8685
hint?.let {
8786
Text(
8887
text = hint,
89-
style = textStyle.copy(color = SikshaColors.Gray400)
88+
style = textStyle.copy(color = SikshaTheme.colors.Gray400)
9089
)
9190
}
9291
}

0 commit comments

Comments
 (0)