Files
Crosspoint/src/components/themes/lyra/Lyra3CoversTheme.h
T
2026-02-22 21:12:22 -05:00

47 lines
2.1 KiB
C++

#pragma once
#include "components/themes/lyra/LyraTheme.h"
class GfxRenderer;
// Lyra theme metrics (zero runtime cost)
namespace Lyra3CoversMetrics {
constexpr ThemeMetrics values = {.batteryWidth = 16,
.batteryHeight = 12,
.topPadding = 5,
.batteryBarHeight = 40,
.headerHeight = 84,
.verticalSpacing = 16,
.contentSidePadding = 20,
.listRowHeight = 40,
.listWithSubtitleRowHeight = 60,
.menuRowHeight = 64,
.menuSpacing = 8,
.tabSpacing = 8,
.tabBarHeight = 40,
.scrollBarWidth = 4,
.scrollBarRightOffset = 5,
.homeTopPadding = 56,
.homeCoverHeight = 226,
.homeCoverTileHeight = 287,
.homeRecentBooksCount = 3,
.buttonHintsHeight = 40,
.sideButtonHintsWidth = 30,
.progressBarHeight = 16,
.bookProgressBarHeight = 4,
.keyboardKeyWidth = 31,
.keyboardKeyHeight = 50,
.keyboardKeySpacing = 0,
.keyboardBottomAligned = true,
.keyboardCenteredText = true};
}
class Lyra3CoversTheme : public LyraTheme {
public:
void drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std::vector<RecentBook>& recentBooks,
const int selectorIndex, bool& coverRendered, bool& coverBufferStored, bool& bufferRestored,
std::function<bool()> storeCoverBuffer) const override;
};