Skip to content

Commit 67d42d1

Browse files
committed
design: Top 5 섹션 폰트 크기, 간격 조정하기
1 parent 0d444bc commit 67d42d1

3 files changed

Lines changed: 20 additions & 13 deletions

File tree

AIProject/iCo/Features/Base/SegmentedControlView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ struct SegmentedControlView: View {
3636
}
3737
} label: {
3838
Text(tabTitles[idx])
39-
.font(selection == idx ? .ico17B : .ico17)
39+
.font(selection == idx ? .ico15B : .ico15)
4040
.frame(maxWidth: .infinity)
4141
.padding(.horizontal, 14)
4242
.padding(.vertical, 8)
43-
.foregroundColor(selection == idx ? .iCoBackgroundWhite : .iCoLabelSecondary)
43+
.foregroundColor(selection == idx ? .white : .iCoLabelSecondary)
4444
.background(
4545
ZStack {
4646
if selection == idx {

AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct AIBriefingView: View {
2929
SubheaderView(subheading: "시장 한눈에 보기")
3030
.padding(.bottom, 4)
3131

32-
VStack(alignment: .leading, spacing: 20) {
32+
VStack(alignment: .leading, spacing: 16) {
3333
FearGreedView()
3434

3535
VStack(spacing: 16) {

AIProject/iCo/Features/Dashboard/View/TopCoinListView.swift

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ struct TopCoinListView: View {
1818
.foregroundStyle(.iCoAccent)
1919

2020
Text("주목할 만한 코인 TOP5")
21+
.foregroundStyle(.iCoLabel)
2122
}
2223
.font(.ico18B)
23-
.padding(.horizontal, 22)
24-
.padding(.top, 20)
2524

2625
SegmentedControlView(
2726
selection: Binding(
@@ -35,14 +34,16 @@ struct TopCoinListView: View {
3534
tabTitles: TopCoinListViewModel.SegmentType.allCases.map { $0.rawValue },
3635
width: .infinity
3736
)
38-
.padding(.horizontal)
37+
.padding(.horizontal, -4)
38+
.padding(.bottom, 4)
3939

4040
if viewModel.isLoading {
4141
DefaultProgressView(status: .loading, message: "시세 불러오는중")
4242
} else {
4343
TopCoinListSection(viewModel: viewModel)
4444
}
4545
}
46+
.padding(22)
4647
.background(.iCoBackground)
4748
.clipShape(RoundedRectangle(cornerRadius: 20))
4849
.overlay(
@@ -95,10 +96,10 @@ struct TopCoinListSection: View {
9596
} label: {
9697
HStack {
9798
Text("\(index + 1)")
98-
.font(.ico16B)
99+
.font(.ico15B)
99100
.foregroundColor(.iCoAccent)
100101
.padding(.trailing, 16)
101-
102+
102103
CachedAsyncImage(resource: .symbol(coin.coinSymbol)) {
103104
Text(String(coin.coinSymbol.prefix(1)))
104105
.font(.ico17Sb)
@@ -115,7 +116,9 @@ struct TopCoinListSection: View {
115116

116117
VStack(alignment: .leading, spacing: 8) {
117118
Text(viewModel.koreanName(for: coin.id))
118-
.font(.ico17)
119+
.font(.ico15Sb)
120+
.lineLimit(1)
121+
.foregroundStyle(.iCoLabel)
119122
if viewModel.selectedSegment == .volume {
120123
Text(coin.formatedVolume)
121124
.font(.ico14)
@@ -129,6 +132,7 @@ struct TopCoinListSection: View {
129132
)
130133
}
131134
}
135+
.padding(.trailing, 8)
132136

133137
Spacer()
134138

@@ -137,21 +141,24 @@ struct TopCoinListSection: View {
137141
values: values,
138142
lineColor: coin.change == .fall ? .iCoNegative : .iCoPositive
139143
)
140-
.frame(width: 100, height: 40)
144+
.frame(width: 80, height: 40)
141145
} else {
142146
ProgressView()
143-
.frame(width: 100, height: 40)
147+
.frame(width: 80, height: 40)
144148
}
145149
}
146-
.padding(.vertical, 16)
147-
.padding(.horizontal, 22)
150+
.padding(.bottom, index != viewModel.topCoins.count - 1 ? 14 : 0)
148151
}
149152
.buttonStyle(.plain)
150153
}
151154
}
155+
.padding(.vertical, 4)
152156
}
153157
}
154158

155159
#Preview {
156160
TopCoinListView()
161+
.environmentObject(ThemeManager())
162+
.environment(CoinStore(coinService: DefaultCoinService(network: NetworkClient())))
163+
.padding()
157164
}

0 commit comments

Comments
 (0)