Adds margin setting and calibre web

Also made the menu items dynamic and capital case. Looks better from a design perspective but I suppose this is an optional thing to accept
This commit is contained in:
Justin Mitchell
2026-01-02 19:39:09 -05:00
parent 062d69dc2a
commit 55c38150cb
13 changed files with 964 additions and 41 deletions

View File

@@ -44,6 +44,7 @@ class CrossPointSettings {
enum FONT_SIZE { SMALL = 0, MEDIUM = 1, LARGE = 2, EXTRA_LARGE = 3 };
enum LINE_COMPRESSION { TIGHT = 0, NORMAL = 1, WIDE = 2 };
enum PARAGRAPH_ALIGNMENT { JUSTIFIED = 0, LEFT_ALIGN = 1, CENTER_ALIGN = 2, RIGHT_ALIGN = 3 };
enum SIDE_MARGIN { MARGIN_NONE = 0, MARGIN_SMALL = 1, MARGIN_MEDIUM = 2, MARGIN_LARGE = 3 };
// Sleep screen settings
uint8_t sleepScreen = DARK;
@@ -64,6 +65,9 @@ class CrossPointSettings {
uint8_t fontSize = MEDIUM;
uint8_t lineSpacing = NORMAL;
uint8_t paragraphAlignment = JUSTIFIED;
uint8_t sideMargin = MARGIN_SMALL;
// OPDS browser settings
char opdsServerUrl[128] = ""; // e.g., "https://home.jmitch.com/books"
~CrossPointSettings() = default;
@@ -77,6 +81,7 @@ class CrossPointSettings {
bool loadFromFile();
float getReaderLineCompression() const;
int getReaderSideMargin() const;
};
// Helper macro to access settings