Local overrides for css and img display

This commit is contained in:
jpirnay
2026-03-20 18:17:34 +01:00
parent a01bb2902e
commit 09e65c30a3
8 changed files with 185 additions and 25 deletions
+8
View File
@@ -1,12 +1,18 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
struct RecentBook {
std::string path;
std::string title;
std::string author;
std::string coverBmpPath;
// -1 = use global setting, otherwise explicit per-book override.
int8_t embeddedStyleOverride = -1;
// -1 = use global setting, otherwise CrossPointSettings::IMAGE_RENDERING value.
int8_t imageRenderingOverride = -1;
bool operator==(const RecentBook& other) const { return path == other.path; }
};
@@ -47,6 +53,8 @@ class RecentBooksStore {
bool loadFromFile();
RecentBook getDataFromBook(std::string path) const;
RecentBook getBookByPath(const std::string& path) const;
bool setReaderOverrides(const std::string& path, int8_t embeddedStyleOverride, int8_t imageRenderingOverride);
private:
bool loadFromBinaryFile();