Xteink-X4-crosspoint-reader/lib
CaptainFrito bf87a7dc60
feat: UI themes, Lyra (#528)
## Summary

### What is the goal of this PR?

- Visual UI overhaul
- UI theme selection

### What changes are included?

- Added a setting "UI Theme": Classic, Lyra
- The classic theme is the current Crosspoint theme
- The Lyra theme implements these mockups:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2003-7596&t=4CSOZqf0n9uQMxDt-0
by Discord users yagofarias, ruby and gan_shu
- New functions in GFXRenderer to render rounded rectangles, greyscale
fills (using dithering) and thick lines
- Basic UI components are factored into BaseTheme methods which can be
overridden by each additional theme. Methods that are not overridden
will fallback to BaseTheme behavior. This means any new
features/components in CrossPoint only need to be developed for the
"Classic" BaseTheme.
- Additional themes can easily be developed by the community using this
foundation

![IMG_7649
Medium](https://github.com/user-attachments/assets/b516f5a9-2636-4565-acff-91a25b93b39b)
![IMG_7746
Medium](https://github.com/user-attachments/assets/def41810-ab6e-4952-b40f-b9ce7d62bea8)
![IMG_7651
Medium](https://github.com/user-attachments/assets/518a9a6d-107a-4be3-9533-43a2b64b944b)



## Additional Context

- Only the Home, Library and main Settings screens have been implemented
so far, this will be extended to the transfer screens and chapter
selection screen later on, but we need to get the ball rolling somehow
:)
- Loading extra covers on the home screen in the Lyra theme takes a
little more time (about 2 seconds), I added a loading bar popup (reusing
the Indexing progress bar from the reader view, factored into a neat UI
component) but the popup adds ~400ms to the loading time.
- ~~Home screen thumbnails will need to be generated separately for each
theme, because they are displayed in different sizes. Because we're
using dithering, displaying a thumb with the wrong size causes the
picture to look janky or dark as it does on the screenshots above. No
worries this will be fixed in a future PR.~~ Thumbs are now generated
with a size parameter
- UI Icons will need to be implemented in a future PR.

---

### 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? _**PARTIALLY**_
This is not a vibe coded PR. Copilot was used for autocompletion to save
time but I reviewed, understood and edited all generated code.

---------

Co-authored-by: Dave Allie <dave@daveallie.com>
2026-02-05 21:50:11 +11:00
..
EpdFont feat: Add CSS parsing and CSS support in EPUBs (#411) 2026-02-05 21:28:10 +11:00
Epub feat: UI themes, Lyra (#528) 2026-02-05 21:50:11 +11:00
expat Add expat and swap out EPUB HTML parser (#2) 2025-12-06 20:57:24 +11:00
FsHelpers Add exFAT support (#150) 2025-12-30 16:09:30 +11:00
GfxRenderer feat: UI themes, Lyra (#528) 2026-02-05 21:50:11 +11:00
hal fix: don't wake up after USB connect (#644) 2026-02-01 22:19:33 +11:00
JpegToBmpConverter fix: #348 fit cover artifacts 2 (#465) 2026-01-27 20:21:15 +11:00
KOReaderSync fix: Fix KOReader document md5 calculation for binary matching progress sync (#529) 2026-01-27 22:14:07 +11:00
miniz Stream inflated EPUB HTMLs down to disk instead of inflating in memory (#4) 2025-12-08 00:39:17 +11:00
OpdsParser fix: OPDS browser OOM (#403) 2026-01-22 01:43:51 +11:00
picojpeg Add JPG image support (#23) 2025-12-21 17:15:17 +11:00
Serialization Add exFAT support (#150) 2025-12-30 16:09:30 +11:00
Txt Add TXT file reader support (#240) 2026-01-14 21:36:40 +11:00
Utf8 fix: truncating chapter titles using UTF-8 safe function (#599) 2026-02-01 22:23:48 +11:00
Xtc feat: UI themes, Lyra (#528) 2026-02-05 21:50:11 +11:00
ZipFile perf: optimize large EPUB indexing from O(n^2) to O(n) (#458) 2026-01-28 01:29:15 +11:00
README Public release 2025-12-03 22:06:45 +11:00

This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into the executable file.

The source code of each library should be placed in a separate directory
("lib/your_library_name/[Code]").

For example, see the structure of the following example libraries `Foo` and `Bar`:

|--lib
|  |
|  |--Bar
|  |  |--docs
|  |  |--examples
|  |  |--src
|  |     |- Bar.c
|  |     |- Bar.h
|  |  |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
|  |
|  |--Foo
|  |  |- Foo.c
|  |  |- Foo.h
|  |
|  |- README --> THIS FILE
|
|- platformio.ini
|--src
   |- main.c

Example contents of `src/main.c` using Foo and Bar:
```
#include <Foo.h>
#include <Bar.h>

int main (void)
{
  ...
}

```

The PlatformIO Library Dependency Finder will find automatically dependent
libraries by scanning project source files.

More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html