A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Hide button hints in landscape CW mode (#637)

## Summary

* This change hides the button hints from overlapping chapter titles
when in landscape CW mode.

Before

![Before](https://github.com/user-attachments/assets/3015a9b3-3fa5-443b-a641-3e65841a6fbc)
After

![After](https://github.com/user-attachments/assets/011de15d-5ae6-429c-8f91-d8f37abe52d9)

## Additional Context

* I initially considered implementing an offset fix, but with potential
UI changes on the horizon, hiding the button hints appears to be the
simplest solution for now.

---

### 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 >

authored by

nscheung and committed by
GitHub
11b2a592 12c20bb0

+10 -4
+5 -2
src/activities/reader/EpubReaderChapterSelectionActivity.cpp
··· 206 206 } 207 207 } 208 208 209 - const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 210 - renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 209 + // Skip button hints in landscape CW mode (they overlap content) 210 + if (renderer.getOrientation() != GfxRenderer::LandscapeClockwise) { 211 + const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 212 + renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 213 + } 211 214 212 215 renderer.displayBuffer(); 213 216 }
+5 -2
src/activities/reader/XtcReaderChapterSelectionActivity.cpp
··· 149 149 renderer.drawText(UI_10_FONT_ID, 20, 60 + (i % pageItems) * 30, title, i != selectorIndex); 150 150 } 151 151 152 - const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 153 - renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 152 + // Skip button hints in landscape CW mode (they overlap content) 153 + if (renderer.getOrientation() != GfxRenderer::LandscapeClockwise) { 154 + const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 155 + renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 156 + } 154 157 155 158 renderer.displayBuffer(); 156 159 }