feat(quickmenu): comprehensive quick menu enhancements
Quick Menu UI Improvements: - Add navigation button hints (prev/next on front buttons, up/down on side buttons) - Fix orientation-aware margins for button hint areas in landscape modes Screen Rotation Toggle: - Add "Rotate Screen" option to toggle between Portrait and Landscape CCW - Force section reindex when orientation changes to properly reflow content - Position is automatically restored via content offset after reindex Customizable Menu Order: - Add "Edit List Order" option (fixed at bottom of menu) - Pick-and-place reordering: select item to move, navigate to destination, place - Visual feedback: filled highlight for cursor, outlined box for item being moved - Menu order persists in settings (quickMenuOrder array in CrossPointSettings) - New default order: Bookmark, Dictionary, Rotate Screen, Settings, Clear Cache Files changed: - CrossPointSettings.h: Add quickMenuOrder[5] setting - QuickMenuActivity.h/cpp: Edit mode, order rendering, pick-and-place logic - EpubReaderActivity.cpp: Handle TOGGLE_ORIENTATION action with section reset
This commit is contained in:
@@ -496,6 +496,28 @@ void EpubReaderActivity::loop() {
|
||||
self->onGoToClearCache();
|
||||
return;
|
||||
}
|
||||
self->updateRequired = true;
|
||||
} else if (action == QuickMenuAction::TOGGLE_ORIENTATION) {
|
||||
// Toggle between Portrait and Landscape CCW
|
||||
if (SETTINGS.orientation == CrossPointSettings::ORIENTATION::PORTRAIT) {
|
||||
SETTINGS.orientation = CrossPointSettings::ORIENTATION::LANDSCAPE_CCW;
|
||||
} else {
|
||||
SETTINGS.orientation = CrossPointSettings::ORIENTATION::PORTRAIT;
|
||||
}
|
||||
SETTINGS.saveToFile();
|
||||
|
||||
// Apply new orientation to renderer
|
||||
if (SETTINGS.orientation == CrossPointSettings::ORIENTATION::PORTRAIT) {
|
||||
self->renderer.setOrientation(GfxRenderer::Orientation::Portrait);
|
||||
} else {
|
||||
self->renderer.setOrientation(GfxRenderer::Orientation::LandscapeCounterClockwise);
|
||||
}
|
||||
|
||||
// Force section reload with new orientation's viewport dimensions
|
||||
xSemaphoreTake(cachedMutex, portMAX_DELAY);
|
||||
self->section.reset();
|
||||
xSemaphoreGive(cachedMutex);
|
||||
|
||||
self->updateRequired = true;
|
||||
} else if (action == QuickMenuAction::GO_TO_SETTINGS) {
|
||||
// Navigate to Settings activity
|
||||
|
||||
Reference in New Issue
Block a user