fix(ui): 缩小卡片并还原设计稿紧凑排布
This commit is contained in:
@@ -80,14 +80,14 @@ struct PanelTrendChart: View {
|
||||
}
|
||||
}
|
||||
private func tooltip(index: Int) -> some View {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
VStack(alignment: .leading, spacing: 3) {
|
||||
Text(dates[index], format: .dateTime.hour().minute().second()).foregroundStyle(.secondary)
|
||||
tooltipRow(firstLabel, values: first, tint: color, index: index)
|
||||
if !second.isEmpty { tooltipRow(secondLabel, values: second, tint: secondColor, format: secondValueFormat, index: index) }
|
||||
if !third.isEmpty { tooltipRow(thirdLabel, values: third, tint: thirdColor, index: index) }
|
||||
if !fourth.isEmpty { tooltipRow(fourthLabel, values: fourth, tint: fourthColor, index: index) }
|
||||
}
|
||||
.font(.system(size: 10)).padding(8)
|
||||
.font(.system(size: 9)).padding(6)
|
||||
.background { TooltipBackground() }
|
||||
.overlay(RoundedRectangle(cornerRadius: 7).strokeBorder(.primary.opacity(0.2)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user