mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-06 23:57:39 +03:00
Fix text centering in cover art thumbnails to align within cell bounds
This commit is contained in:
parent
8ca01e9ede
commit
1d8815249d
@ -40,7 +40,8 @@ This project is **not affiliated with Xteink**; it's built as a community projec
|
|||||||
- [ ] User provided fonts
|
- [ ] User provided fonts
|
||||||
- [ ] Full UTF support
|
- [ ] Full UTF support
|
||||||
- [x] Screen rotation
|
- [x] Screen rotation
|
||||||
- [x] Bluetooth LE Support
|
- [ ] Bluetooth LE Support
|
||||||
|
- [ ] FTP server support
|
||||||
- [x] Adjustable sleep timer
|
- [x] Adjustable sleep timer
|
||||||
- [x] Set default folder
|
- [x] Set default folder
|
||||||
|
|
||||||
|
|||||||
@ -296,7 +296,11 @@ void CoverArtPickerActivity::drawCoverThumbnail(const std::string& filePath, int
|
|||||||
|
|
||||||
// Fallback: show filename with border
|
// Fallback: show filename with border
|
||||||
renderer.drawRect(x + 20, y + 20, COVER_WIDTH - 40, COVER_HEIGHT - 60);
|
renderer.drawRect(x + 20, y + 20, COVER_WIDTH - 40, COVER_HEIGHT - 60);
|
||||||
renderer.drawCenteredText(SMALL_FONT_ID, y + COVER_HEIGHT - 30, displayName.c_str(), true);
|
|
||||||
|
// Draw filename centered within the cell (not screen-wide)
|
||||||
|
const int textWidth = renderer.getTextWidth(SMALL_FONT_ID, displayName.c_str());
|
||||||
|
const int textX = x + (COVER_WIDTH - textWidth) / 2;
|
||||||
|
renderer.drawText(SMALL_FONT_ID, textX, y + COVER_HEIGHT - 30, displayName.c_str(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoverArtPickerActivity::render() const {
|
void CoverArtPickerActivity::render() const {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user