feat: 样式细节调整
This commit is contained in:
parent
982c32cfdb
commit
6bf52f1286
@ -1003,7 +1003,8 @@ struct BlindBoxView: View {
|
|||||||
showSettings: $showSettings
|
showSettings: $showSettings
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.offset(x: showSettings ? UIScreen.main.bounds.width : 0)
|
.shadow(color: .black.opacity(0.3), radius: 10, x: 5, y: 0)
|
||||||
|
.offset(x: showSettings ? UIScreen.main.bounds.width : 0)
|
||||||
.animation(.spring(response: 0.6, dampingFraction: 0.8), value: showSettings)
|
.animation(.spring(response: 0.6, dampingFraction: 0.8), value: showSettings)
|
||||||
|
|
||||||
// 设置页面遮罩层
|
// 设置页面遮罩层
|
||||||
|
|||||||
@ -121,7 +121,6 @@ struct UserProfileModal: View {
|
|||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 16)
|
RoundedRectangle(cornerRadius: 16)
|
||||||
.fill(Color.white)
|
.fill(Color.white)
|
||||||
.shadow(color: .black.opacity(0.1), radius: 4, x: 0, y: 2)
|
|
||||||
)
|
)
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
|
|
||||||
@ -259,14 +258,12 @@ struct UserProfileModal: View {
|
|||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 16)
|
RoundedRectangle(cornerRadius: 16)
|
||||||
.fill(Color.white)
|
.fill(Color.white)
|
||||||
.shadow(color: .black.opacity(0.1), radius: 4, x: 0, y: 2)
|
|
||||||
)
|
)
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(width: UIScreen.main.bounds.width * 0.8)
|
.frame(width: UIScreen.main.bounds.width * 0.8)
|
||||||
.background(Color.themeTextWhiteSecondary)
|
.background(Color.themeTextWhiteSecondary)
|
||||||
.cornerRadius(20, corners: [.topRight, .bottomRight])
|
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
fetchUserInfo()
|
fetchUserInfo()
|
||||||
|
|||||||
@ -121,11 +121,11 @@ struct AccountView: View {
|
|||||||
|
|
||||||
}) {
|
}) {
|
||||||
Text("Confirm")
|
Text("Confirm")
|
||||||
.foregroundColor(.themeTextMessage)
|
.foregroundColor(.themeTextWhite)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color.white)
|
.background(Color.themeTextWhiteSecondary)
|
||||||
.cornerRadius(32)
|
.cornerRadius(32)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,8 +145,16 @@ struct PermissionRow: View {
|
|||||||
// 权限开关
|
// 权限开关
|
||||||
Toggle("", isOn: .constant(isEnabled))
|
Toggle("", isOn: .constant(isEnabled))
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
.tint(Color.themePrimary) // 使用主题色
|
.tint(Color.themePrimary)
|
||||||
.disabled(true) // 禁用交互,仅用于显示状态
|
.disabled(true)
|
||||||
|
.onAppear {
|
||||||
|
// 使用主题色并确保完全不透明
|
||||||
|
let themeColor = UIColor(Color.themePrimary)
|
||||||
|
UISwitch.appearance(whenContainedInInstancesOf: [UIView.self]).onTintColor = themeColor
|
||||||
|
UISwitch.appearance(whenContainedInInstancesOf: [UIView.self]).thumbTintColor = .white
|
||||||
|
// 确保使用不透明的背景
|
||||||
|
UISwitch.appearance(whenContainedInInstancesOf: [UIView.self]).backgroundColor = UIColor.clear
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user