fix: Show all system items (quit, help, theme) and fix deduplication

- StatusBarState now initializes with all 3 system items
- Added deduplication logic to StatusBar.renderToBuffer
- User items with same shortcut override system items
- Updated Example App to not duplicate 'q quit'
- Updated tests for 3 system items instead of 1
This commit is contained in:
phranck
2026-01-28 20:40:52 +01:00
parent 8b4d1cfe7e
commit b9a6cc29ab
4 changed files with 38 additions and 23 deletions
+1 -3
View File
@@ -45,7 +45,6 @@ struct ContentView: View {
StatusBarItem(shortcut: Shortcut.arrowsUpDown, label: "nav")
StatusBarItem(shortcut: Shortcut.enter, label: "select", key: .enter)
StatusBarItem(shortcut: Shortcut.range("1", "6"), label: "jump")
StatusBarItem(shortcut: Shortcut.quit, label: "quit")
}
case .textStyles:
TextStylesPage()
@@ -74,8 +73,7 @@ struct ContentView: View {
StatusBarItem(shortcut: Shortcut.escape, label: "back") {
ExampleAppState.shared.currentPage = .menu
},
StatusBarItem(shortcut: Shortcut.arrowsUpDown, label: "scroll"),
StatusBarItem(shortcut: Shortcut.quit, label: "quit")
StatusBarItem(shortcut: Shortcut.arrowsUpDown, label: "scroll")
]
}
}