feat(ui): 统一实现卡片背景趋势与大数值布局
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import SwiftUI
|
||||
|
||||
/// Shared roles for the compact monitoring panel. Micro charts keep their own 8pt role.
|
||||
/// Shared roles for auxiliary labels and native panel controls.
|
||||
enum PanelStyle {
|
||||
static let title = Font.system(size: 13, weight: .semibold)
|
||||
static let label = Font.system(size: 10)
|
||||
@@ -9,15 +9,6 @@ enum PanelStyle {
|
||||
static let padding: CGFloat = 10
|
||||
static let gap: CGFloat = 8
|
||||
static let titleHeight: CGFloat = 20
|
||||
static let plotHeight: CGFloat = 48
|
||||
}
|
||||
|
||||
struct CardSeparator: View {
|
||||
var body: some View {
|
||||
Rectangle().fill(.primary.opacity(0.08)).frame(height: 1)
|
||||
.padding(.vertical, 2)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
struct CardField<Content: View>: View {
|
||||
@@ -42,13 +33,6 @@ struct CardSurface: ViewModifier {
|
||||
}
|
||||
}
|
||||
|
||||
struct CardInset: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content.padding(.horizontal, 8).padding(.vertical, 5)
|
||||
.background(.primary.opacity(0.04), in: RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
|
||||
/// Segment widths are proportional to the supplied total, without minimum fills.
|
||||
struct CapacityBar: View {
|
||||
let values: [Double]
|
||||
|
||||
Reference in New Issue
Block a user