## Summary Implements Lyra theme for some more Crosspoint screens:       ## Additional Context - A bit of refactoring for list scrolling logic --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --------- Co-authored-by: Dave Allie <dave@daveallie.com>
42 lines
1.8 KiB
C++
42 lines
1.8 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};
|
|
}
|
|
|
|
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;
|
|
};
|