chore: post-sync cleanup and clang-format
- Remove stale Lyra3CoversTheme.h (functionality merged into LyraTheme) - Fix UITheme.cpp to use LyraTheme for LYRA_3_COVERS theme variant - Update open-x4-sdk submodule to 91e7e2b (drawImageTransparent support) - Run clang-format on all source files Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <HalStorage.h>
|
||||
#include <I18n.h>
|
||||
#include <Logging.h>
|
||||
|
||||
#include <PlaceholderCoverGenerator.h>
|
||||
|
||||
#include "CrossPointSettings.h"
|
||||
@@ -242,8 +241,7 @@ void EpubReaderActivity::loop() {
|
||||
}
|
||||
|
||||
// Long press CONFIRM opens Table of Contents directly (skip menu)
|
||||
if (mappedInput.isPressed(MappedInputManager::Button::Confirm) &&
|
||||
mappedInput.getHeldTime() >= longPressConfirmMs) {
|
||||
if (mappedInput.isPressed(MappedInputManager::Button::Confirm) && mappedInput.getHeldTime() >= longPressConfirmMs) {
|
||||
ignoreNextConfirmRelease = true;
|
||||
if (epub && epub->getTocItemsCount() > 0) {
|
||||
openChapterSelection(true); // skip the stale release from this long-press
|
||||
@@ -266,8 +264,8 @@ void EpubReaderActivity::loop() {
|
||||
}
|
||||
const int bookProgressPercent = clampPercent(static_cast<int>(bookProgress + 0.5f));
|
||||
const bool hasDictionary = Dictionary::exists();
|
||||
const bool isBookmarked = BookmarkStore::hasBookmark(
|
||||
epub->getCachePath(), currentSpineIndex, section ? section->currentPage : 0);
|
||||
const bool isBookmarked =
|
||||
BookmarkStore::hasBookmark(epub->getCachePath(), currentSpineIndex, section ? section->currentPage : 0);
|
||||
exitActivity();
|
||||
enterNewActivity(new EpubReaderMenuActivity(
|
||||
this->renderer, this->mappedInput, epub->getTitle(), currentPage, totalPages, bookProgressPercent,
|
||||
@@ -935,13 +933,11 @@ void EpubReaderActivity::render(Activity::RenderLock&& lock) {
|
||||
|
||||
silentIndexingActive = false;
|
||||
const bool textOnlyPage = !p->hasImages();
|
||||
if (textOnlyPage &&
|
||||
SETTINGS.indexingDisplay != CrossPointSettings::INDEXING_DISPLAY::INDEXING_POPUP &&
|
||||
if (textOnlyPage && SETTINGS.indexingDisplay != CrossPointSettings::INDEXING_DISPLAY::INDEXING_POPUP &&
|
||||
section->pageCount >= 1 &&
|
||||
((section->pageCount == 1 && section->currentPage == 0) ||
|
||||
(section->pageCount >= 2 && section->currentPage == section->pageCount - 2)) &&
|
||||
currentSpineIndex + 1 < epub->getSpineItemsCount() &&
|
||||
preIndexedNextSpine != currentSpineIndex + 1) {
|
||||
currentSpineIndex + 1 < epub->getSpineItemsCount() && preIndexedNextSpine != currentSpineIndex + 1) {
|
||||
Section probe(epub, currentSpineIndex + 1, renderer);
|
||||
if (probe.loadSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
|
||||
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
|
||||
@@ -971,9 +967,8 @@ bool EpubReaderActivity::silentIndexNextChapterIfNeeded(const uint16_t viewportW
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool shouldPreIndex =
|
||||
(section->pageCount == 1 && section->currentPage == 0) ||
|
||||
(section->pageCount >= 2 && section->currentPage == section->pageCount - 2);
|
||||
const bool shouldPreIndex = (section->pageCount == 1 && section->currentPage == 0) ||
|
||||
(section->pageCount >= 2 && section->currentPage == section->pageCount - 2);
|
||||
if (!epub || !section || !shouldPreIndex) {
|
||||
silentIndexingActive = false;
|
||||
return false;
|
||||
@@ -1065,8 +1060,8 @@ void EpubReaderActivity::renderContents(std::unique_ptr<Page> page, const int or
|
||||
if (page->getImageBoundingBox(imgX, imgY, imgW, imgH)) {
|
||||
int screenX = imgX + orientedMarginLeft;
|
||||
int screenY = imgY + orientedMarginTop;
|
||||
LOG_DBG("ERS", "Image page: fast double-refresh (page bbox: %d,%d %dx%d, screen: %d,%d %dx%d)",
|
||||
imgX, imgY, imgW, imgH, screenX, screenY, imgW, imgH);
|
||||
LOG_DBG("ERS", "Image page: fast double-refresh (page bbox: %d,%d %dx%d, screen: %d,%d %dx%d)", imgX, imgY, imgW,
|
||||
imgH, screenX, screenY, imgW, imgH);
|
||||
|
||||
#if USE_IMAGE_DOUBLE_FAST_REFRESH == 0
|
||||
// Method A: Fill blank area + two FAST_REFRESH operations
|
||||
@@ -1233,8 +1228,7 @@ void EpubReaderActivity::renderStatusBar(const int orientedMarginRight, const in
|
||||
if (SETTINGS.indexingDisplay == CrossPointSettings::INDEXING_DISPLAY::INDEXING_STATUS_TEXT) {
|
||||
renderer.drawText(SMALL_FONT_ID, indicatorX, textY, tr(STR_INDEXING));
|
||||
} else if (SETTINGS.indexingDisplay == CrossPointSettings::INDEXING_DISPLAY::INDEXING_STATUS_ICON) {
|
||||
renderer.drawIcon(kIndexingIcon, indicatorX, textY - kIndexingIconSize + 2, kIndexingIconSize,
|
||||
kIndexingIconSize);
|
||||
renderer.drawIcon(kIndexingIcon, indicatorX, textY - kIndexingIconSize + 2, kIndexingIconSize, kIndexingIconSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user