一个图标的优化

This commit is contained in:
2024-01-24 16:45:23 +08:00
parent c10f0dd29d
commit e681d68c65
3 changed files with 18 additions and 14 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -13,13 +13,13 @@ struct HomeView: View {
var body: some View {
ScrollView {
VStack(spacing: 12) {
// Search
Search
// Banner
// Navigation
// TodayKill
// Living
// Bestselling
PartyReading
// PartyReading
// NewBooks
// Categories
}
@@ -271,18 +271,22 @@ struct HomeView: View {
.padding(12)
.background(Color.white)
.cornerRadius(32)
ZStack {
Image(systemName: "bell").resizable().frame(width: 24, height: 24)
Text("9")
.font(.system(size: 12))
.padding(4)
.frame(minWidth: 24)
.background(Color.red)
.foregroundColor(Color.white)
.cornerRadius(99)
.offset(x: 10, y: -10)
}
.padding(.trailing, 12)
Image(systemName: "bell")
.resizable()
.frame(width: 24, height: 24)
.overlay(alignment: .topTrailing) {
Circle()
.fill(Color.red)
.frame(width: 20, height: 20)
.offset(x: 4, y: -8)
}
.overlay(alignment: .topTrailing) {
Text("20")
.foregroundColor(Color.white)
.font(.system(size: 12))
.offset(x: 2, y: -5)
}
Spacer()
}
}
}