Consolidate shared UI, hardware transport, and translation tooling
This commit is contained in:
1 parent
ed6951f4cd
commit
2c612de63b
61 files changed
+2417
-1573
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package emoji
|
||||
|
||||
import "sort"
|
||||
|
||||
// PickerColumns is the grid width both readers' pickers use.
|
||||
const PickerColumns = 6
|
||||
|
||||
// PickerTabs returns the picker's tabs in order: an "all" tab with every
|
||||
// entry sorted by label, then one tab per category in catalog order. Each
|
||||
// reader builds its own grid control from these, since control IDs, actions,
|
||||
// label translation and extra controls are reader decisions.
|
||||
func PickerTabs() []Category {
|
||||
categories := Categories()
|
||||
var all []Entry
|
||||
for _, category := range categories {
|
||||
all = append(all, category.Entries...)
|
||||
}
|
||||
sort.SliceStable(all, func(i, j int) bool { return all[i].Label < all[j].Label })
|
||||
return append([]Category{{ID: "all", Label: "All", Entries: all}}, categories...)
|
||||
}
|
||||
Reference in new issue
Block a user