Add icon rendering and list scroll gesture support
Implement orientation-aware icon rendering using freeink::Icon format that applies rotation transforms per-pixel. Add wasListScroll helper for touch-based list navigation with swipe gestures. Switch vertical centering from x-height to cap-height for better visual alignment with capital-led UI labels.
This commit is contained in:
1 parent
e103cdfd11
commit
4a5b45409f
20 files changed
+339
-96
No files matched your search
@@ -130,6 +130,17 @@ void SettingsActivity::loop() {
|
||||
selectedSettingIndex = 0;
|
||||
hasChangedCategory = true;
|
||||
requestUpdate();
|
||||
} else if (swipe == MappedInputManager::SwipeDir::Up || swipe == MappedInputManager::SwipeDir::Down) {
|
||||
// Vertical swipe scrolls the settings list a page at a time (touch navigation
|
||||
// without the side buttons). Swipe up moves down the list, and vice versa.
|
||||
const int page = std::max(
|
||||
1, UITheme::getNumberOfItemsPerPage(renderer, true, true, BaseTheme::showButtonHints(), false));
|
||||
if (swipe == MappedInputManager::SwipeDir::Up) {
|
||||
selectedSettingIndex = std::min(selectedSettingIndex + page, settingsCount);
|
||||
} else {
|
||||
selectedSettingIndex = std::max(selectedSettingIndex - page, 0);
|
||||
}
|
||||
requestUpdate();
|
||||
}
|
||||
|
||||
// Tap a settings row to select + activate it. Row 0 is the tab bar, so the list
|
||||
|
||||
Reference in new issue
Block a user