feat: add BmpViewer activity for viewing .bmp images in file browser (port upstream PR #887)

New BmpViewerActivity opens, parses, and renders BMP files with centered
aspect-ratio-preserving display and localized back navigation. Library
file filter extended to include .bmp. ReaderActivity routes BMP paths to
the new viewer. LyraTheme button hint backgrounds switched to rounded
rect fills to prevent overflow artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cottongin
2026-02-21 18:37:43 -05:00
parent 9d9bc019a2
commit 2eae521b6a
6 changed files with 114 additions and 3 deletions

View File

@@ -18,12 +18,14 @@ class ReaderActivity final : public ActivityWithSubactivity {
static std::unique_ptr<Txt> loadTxt(const std::string& path);
static bool isXtcFile(const std::string& path);
static bool isTxtFile(const std::string& path);
static bool isBmpFile(const std::string& path);
static std::string extractFolderPath(const std::string& filePath);
void goToLibrary(const std::string& fromBookPath = "");
void onGoToEpubReader(std::unique_ptr<Epub> epub);
void onGoToXtcReader(std::unique_ptr<Xtc> xtc);
void onGoToTxtReader(std::unique_ptr<Txt> txt);
void onGoToBmpViewer(const std::string& path);
public:
explicit ReaderActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, std::string initialBookPath,