🔄 反转行号 stepper:+上移 -下移
This commit is contained in:
parent
d463189e39
commit
000567a8bb
@ -121,11 +121,17 @@ struct SettingsView: View {
|
|||||||
.font(.system(size: 11))
|
.font(.system(size: 11))
|
||||||
.frame(width: 26, alignment: .leading)
|
.frame(width: 26, alignment: .leading)
|
||||||
|
|
||||||
// 行号 stepper
|
// 行号 stepper(+向上 -向下)
|
||||||
Stepper("", value: row, in: 1...10)
|
Stepper {
|
||||||
.labelsHidden()
|
Text("")
|
||||||
.scaleEffect(0.7)
|
} onIncrement: {
|
||||||
.frame(width: 24)
|
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)")
|
Text("\(row.wrappedValue)")
|
||||||
.font(.system(size: 11, design: .monospaced))
|
.font(.system(size: 11, design: .monospaced))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user