diff --git a/Sources/FloatingMonitor/Views/SettingsView.swift b/Sources/FloatingMonitor/Views/SettingsView.swift index 729ce19..3c93c99 100644 --- a/Sources/FloatingMonitor/Views/SettingsView.swift +++ b/Sources/FloatingMonitor/Views/SettingsView.swift @@ -121,11 +121,17 @@ struct SettingsView: View { .font(.system(size: 11)) .frame(width: 26, alignment: .leading) - // 行号 stepper - Stepper("", value: row, in: 1...10) - .labelsHidden() - .scaleEffect(0.7) - .frame(width: 24) + // 行号 stepper(+向上 -向下) + Stepper { + Text("") + } onIncrement: { + if row.wrappedValue > 1 { row.wrappedValue -= 1 } + } onDecrement: { + if row.wrappedValue < 10 { row.wrappedValue += 1 } + } + .labelsHidden() + .scaleEffect(0.7) + .frame(width: 24) Text("\(row.wrappedValue)") .font(.system(size: 11, design: .monospaced)) .foregroundColor(.secondary)