Fix formatting

This commit is contained in:
Dave Allie 2025-12-15 23:17:23 +11:00
parent a640fbecf8
commit 108cf57202
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F
8 changed files with 21 additions and 30 deletions

View File

@ -47,8 +47,7 @@ class ChapterHtmlSlimParser {
public:
explicit ChapterHtmlSlimParser(const char* filepath, GfxRenderer& renderer, const int fontId,
const float lineCompression, const int marginTop, const int marginRight,
const int marginBottom, const int marginLeft,
const bool extraParagraphSpacing,
const int marginBottom, const int marginLeft, const bool extraParagraphSpacing,
const std::function<void(std::unique_ptr<Page>)>& completePageFn)
: filepath(filepath),
renderer(renderer),

View File

@ -24,9 +24,7 @@ class CrossPointSettings {
~CrossPointSettings() = default;
// Get singleton instance
static CrossPointSettings& getInstance() {
return instance;
}
static CrossPointSettings& getInstance() { return instance; }
bool saveToFile() const;
bool loadFromFile();

View File

@ -205,8 +205,8 @@ void EpubReaderScreen::renderScreen() {
const auto filepath = epub->getSpineItem(currentSpineIndex);
Serial.printf("[%lu] [ERS] Loading file: %s, index: %d\n", millis(), filepath.c_str(), currentSpineIndex);
section = std::unique_ptr<Section>(new Section(epub, currentSpineIndex, renderer));
if (!section->loadCacheMetadata(READER_FONT_ID, lineCompression, marginTop, marginRight, marginBottom,
marginLeft, SETTINGS.extraParagraphSpacing)) {
if (!section->loadCacheMetadata(READER_FONT_ID, lineCompression, marginTop, marginRight, marginBottom, marginLeft,
SETTINGS.extraParagraphSpacing)) {
Serial.printf("[%lu] [ERS] Cache not found, building...\n", millis());
{

View File

@ -129,8 +129,7 @@ void FileSelectionScreen::render() const {
renderer.drawCenteredText(READER_FONT_ID, 10, "CrossPoint Reader", true, BOLD);
// Help text
renderer.drawText(SMALL_FONT_ID, 20, GfxRenderer::getScreenHeight() - 30,
"Press BACK for Settings");
renderer.drawText(SMALL_FONT_ID, 20, GfxRenderer::getScreenHeight() - 30, "Press BACK for Settings");
if (files.empty()) {
renderer.drawText(UI_FONT_ID, 20, 60, "No EPUBs found");

View File

@ -9,8 +9,7 @@
const SettingInfo SettingsScreen::settingsList[SettingsScreen::settingsCount] = {
{"White Sleep Screen", &CrossPointSettings::whiteSleepScreen},
{"Extra Paragraph Spacing", &CrossPointSettings::extraParagraphSpacing}
};
{"Extra Paragraph Spacing", &CrossPointSettings::extraParagraphSpacing}};
void SettingsScreen::taskTrampoline(void* param) {
auto* self = static_cast<SettingsScreen*>(param);
@ -20,8 +19,6 @@ void SettingsScreen::taskTrampoline(void* param) {
void SettingsScreen::onEnter() {
renderingMutex = xSemaphoreCreateMutex();
// Reset selection to first item
selectedSettingIndex = 0;
@ -135,8 +132,7 @@ void SettingsScreen::render() const {
}
// Draw help text
renderer.drawText(SMALL_FONT_ID, 20, pageHeight - 30,
"Press OK to toggle, BACK to save & exit");
renderer.drawText(SMALL_FONT_ID, 20, pageHeight - 30, "Press OK to toggle, BACK to save & exit");
// Always use standard refresh for settings screen
renderer.displayBuffer();

View File

@ -1,9 +1,9 @@
#pragma once
#include <cstdint>
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
#include <freertos/task.h>
#include <cstdint>
#include <string>
#include <vector>
@ -34,8 +34,7 @@ class SettingsScreen final : public Screen {
void toggleCurrentSetting();
public:
explicit SettingsScreen(GfxRenderer& renderer, InputManager& inputManager,
const std::function<void()>& onGoHome)
explicit SettingsScreen(GfxRenderer& renderer, InputManager& inputManager, const std::function<void()>& onGoHome)
: Screen(renderer, inputManager), onGoHome(onGoHome) {}
void onEnter() override;
void onExit() override;

View File

@ -2,9 +2,9 @@
#include <GfxRenderer.h>
#include "CrossPointSettings.h"
#include "config.h"
#include "images/CrossLarge.h"
#include "CrossPointSettings.h"
void SleepScreen::onEnter() {
const auto pageWidth = GfxRenderer::getScreenWidth();