release(ios): 发布 0.2.1 并重构图标与界面细节
- 应用图标改用与 Web favicon 同源的扁平标记,金色 SIM 卡体加三格递增信号,29pt 下仍可读 - 标签统一为胶囊形状,提高深色主题下的描边权重,避免标签在暗色下消失 - 消息卡片与详情分区卡片收紧行距,单屏信息密度明显提升 - 详情头部指标精简为 4 行,数据模块改为单条读数 - 批量选择勾选框移出名称区域,工具栏控件统一为等高 34pt - 分组编辑器改为点选即生效,移除说明文字与常驻禁用按钮
This commit is contained in:
@@ -89,15 +89,9 @@ public struct AIButtonStyle: ButtonStyle {
|
||||
.frame(maxWidth: fillsWidth ? .infinity : nil)
|
||||
.frame(width: fixedWidth)
|
||||
.background(
|
||||
kind == .primary && isEnabled && size != .toolbarInline
|
||||
? AnyShapeStyle(
|
||||
LinearGradient(
|
||||
colors: [AITheme.primaryTop, AITheme.primaryBottom],
|
||||
startPoint: .top,
|
||||
endPoint: .bottom
|
||||
)
|
||||
)
|
||||
: AnyShapeStyle(kind.backgroundColor(isEnabled: isEnabled))
|
||||
// 主色面用纯色。之前的 primaryTop/primaryBottom 竖向渐变在系统里会被合成成灰紫,
|
||||
// 实测 #3B82F6 掉到 #6B81CA,整片按钮发脏。
|
||||
AnyShapeStyle(kind.backgroundColor(isEnabled: isEnabled))
|
||||
)
|
||||
.shadow(
|
||||
color: (kind == .secondary || !isEnabled) ? .clear : .black.opacity(0.10),
|
||||
@@ -107,13 +101,13 @@ public struct AIButtonStyle: ButtonStyle {
|
||||
)
|
||||
.clipShape(
|
||||
RoundedRectangle(
|
||||
cornerRadius: size == .toolbarInline ? AITheme.toolbarButtonHeight / 2 : AITheme.buttonRadius,
|
||||
cornerRadius: cornerRadius,
|
||||
style: .continuous
|
||||
)
|
||||
)
|
||||
.overlay {
|
||||
RoundedRectangle(
|
||||
cornerRadius: size == .toolbarInline ? AITheme.toolbarButtonHeight / 2 : AITheme.buttonRadius,
|
||||
cornerRadius: cornerRadius,
|
||||
style: .continuous
|
||||
)
|
||||
.strokeBorder(
|
||||
@@ -126,6 +120,15 @@ public struct AIButtonStyle: ButtonStyle {
|
||||
.opacity(configuration.isPressed ? 0.82 : 1)
|
||||
}
|
||||
|
||||
/// 工具栏里的图标按钮需要更小的圆角,否则 34pt 方块看起来像被切过。
|
||||
private var cornerRadius: CGFloat {
|
||||
switch size {
|
||||
case .toolbarInline: return AITheme.toolbarButtonHeight / 2
|
||||
case .icon: return AITheme.iconButtonRadius
|
||||
default: return AITheme.buttonRadius
|
||||
}
|
||||
}
|
||||
|
||||
private var minimumWidth: CGFloat {
|
||||
switch size {
|
||||
case .compact: return AITheme.compactButtonMinWidth
|
||||
|
||||
Reference in New Issue
Block a user