缺少代码差异信息,无法生成具体的commit message。请提供code differences内容以便分析并生成符合Angular规范的提交信息。
当您提供代码差异后,我将按照以下格式生成: ``` <type>(<scope>): <subject> <body> ``` 其中type会根据更改类型选择(feat、fix、docs、style、refactor等),scope表示影响范围,subject简要描述变更内容,body详细说明修改内容。
This commit is contained in:
@@ -4,9 +4,9 @@ struct TjLockChip: View {
|
||||
var body: some View {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "lock.fill")
|
||||
.font(.system(size: 9, weight: .semibold))
|
||||
.font(.tjScaled( 9, weight: .semibold))
|
||||
Text("本地加密")
|
||||
.font(.system(size: 10))
|
||||
.font(.tjScaled( 10))
|
||||
.tracking(0.5)
|
||||
}
|
||||
.foregroundStyle(Tj.Palette.paper)
|
||||
@@ -44,7 +44,7 @@ struct TjBadge: View {
|
||||
var style: TjBadgeStyle = .neutral
|
||||
var body: some View {
|
||||
Text(text)
|
||||
.font(.system(size: 10, weight: .semibold))
|
||||
.font(.tjScaled( 10, weight: .semibold))
|
||||
.tracking(0.3)
|
||||
.foregroundStyle(style.fg)
|
||||
.padding(.horizontal, 7)
|
||||
@@ -66,7 +66,7 @@ struct TjPlaceholder: View {
|
||||
DiagonalStripes(spacing: 7, color: dark ? Color.white.opacity(0.04) : Color.black.opacity(0.05))
|
||||
.clipShape(RoundedRectangle(cornerRadius: radius, style: .continuous))
|
||||
Text(label)
|
||||
.font(.system(size: 11, design: .monospaced))
|
||||
.font(.tjScaled( 11, design: .monospaced))
|
||||
.tracking(0.5)
|
||||
.foregroundStyle(dark ? Color.white.opacity(0.5) : Tj.Palette.text3)
|
||||
.multilineTextAlignment(.center)
|
||||
@@ -101,7 +101,7 @@ struct TjPrimaryButton: ButtonStyle {
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
.font(.system(size: fontSize, weight: .semibold))
|
||||
.font(.tjScaled( fontSize, weight: .semibold))
|
||||
.tracking(1)
|
||||
.foregroundStyle(Tj.Palette.paper)
|
||||
.padding(.horizontal, horizontalPadding)
|
||||
@@ -118,7 +118,7 @@ struct TjGhostButton: ButtonStyle {
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
.font(.system(size: fontSize, weight: .semibold))
|
||||
.font(.tjScaled( fontSize, weight: .semibold))
|
||||
.tracking(1)
|
||||
.foregroundStyle(Tj.Palette.ink)
|
||||
.padding(.horizontal, horizontalPadding)
|
||||
|
||||
@@ -39,10 +39,18 @@ enum Tj {
|
||||
}
|
||||
|
||||
extension Font {
|
||||
static func tjTitle(_ size: CGFloat = 30) -> Font { .system(size: size, weight: .bold, design: .default) }
|
||||
static func tjH2(_ size: CGFloat = 18) -> Font { .system(size: size, weight: .bold, design: .default) }
|
||||
static func tjMono(_ size: CGFloat = 11) -> Font { .system(size: size, weight: .regular, design: .monospaced) }
|
||||
static func tjSerifBody(_ size: CGFloat = 17) -> Font { .system(size: size, weight: .regular, design: .default) }
|
||||
/// 全 App 字体的唯一缩放出口。按全局档位 `appFontScale` 放大字号(老年/视力辅助)。
|
||||
/// 所有固定字号都经 `.system(size:)` → 机械迁移为 `.tjScaled(` 走这里;改档位 + 根视图重建即全局生效。
|
||||
static func tjScaled(_ size: CGFloat,
|
||||
weight: Font.Weight = .regular,
|
||||
design: Font.Design = .default) -> Font {
|
||||
.system(size: size * appFontScale, weight: weight, design: design)
|
||||
}
|
||||
|
||||
static func tjTitle(_ size: CGFloat = 30) -> Font { .tjScaled(size, weight: .bold) }
|
||||
static func tjH2(_ size: CGFloat = 18) -> Font { .tjScaled(size, weight: .bold) }
|
||||
static func tjMono(_ size: CGFloat = 11) -> Font { .tjScaled(size, design: .monospaced) }
|
||||
static func tjSerifBody(_ size: CGFloat = 17) -> Font { .tjScaled(size) }
|
||||
}
|
||||
|
||||
extension View {
|
||||
|
||||
Reference in New Issue
Block a user