Local overrides for css and img display
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user