ensure clicking anywhere outside tracklists can unselect all

This commit is contained in:
Drew Weymouth
2024-12-15 15:52:21 -08:00
parent 46153f5fe3
commit 1d342bf413
9 changed files with 113 additions and 48 deletions
+7
View File
@@ -36,6 +36,7 @@ type Searchable interface {
// Pages with selection should implement this interface to receive Ctrl+A events
type CanSelectAll interface {
SelectAll()
UnselectAll()
}
// Pages that have one main scrollable view should implement this interface
@@ -199,6 +200,12 @@ func (b *BrowsingPane) SelectAll() {
}
}
func (b *BrowsingPane) UnselectAll() {
if s, ok := b.curPage.(CanSelectAll); ok {
s.UnselectAll()
}
}
func (b *BrowsingPane) ScrollUp() {
b.scrollBy(-75)
}