feat: split status bar setting#733
Conversation
|
I liked the idea of a more customizable status bar, but the settings look to crowded this way. I think we need settings grouping first. |
f71a7ff to
a12cc54
Compare
a12cc54 to
b506fba
Compare
|
Thank you, it looks nice with this kind of preview. Small things: Display Book Progress Bar missing,
This is a small setting for those who want it. It works as before by default. You can also implement the setting called
And it should probably say Other than that, this page looks really good |
b506fba to
ec0e997
Compare
Currently working on this now - is this a highly sought after feature? I'm weary that we don't want too add too many small settings, as we could end up with hundreds of those! Happy for Dave/a collaborator to weigh in before the merge on that, though.
I don't know enough about this issue - looks like from the discussions the fill could be better as a fix rather than a new setting?
They're intended to match (more or less) to the naming structure of the rest of the settings - the majority have the target as the name and the action as the option (think Paragraph Alignment -> Justify rather than Align Paragraph -> Justified). I do agree that it needs a little update (thanks!), so I've changed the options to verbs b423319
Good point - I've updated to "Customise Status Bar" as that feels like it would be suitable for both places 65dc63f Thanks for your feedback! 🙂 |
|
Bar thickness is not a small setting, in horizontal mode on a white model the default line looks too thick #602 and distracting, not how it was intended (it looks normal in vertical mode). And border fill will look even thicker on a white model. The two new settings inside a specific subpage don't affect the basic experience at all, it works like before by default. And these settings actually improve the experience, as they provide a decent solution for black devices without ruining the visual appearance of white devices. This is literally taking everyone's interests into account, rather than trying to create a uniform experience for everyone. |
Ah - got you. In that case I agree, although that does make the preview rather redundant for this setting, given the use case. I think we may have to just accept that, though - unless anyone has suggestions? |
|
It's as if you're overthinking the settings without prioritizing actual reading experience. Navigating through this settings section will take up 1% of the user's time. But the other 99% of the time:
I'm fine with the case where, after reading in horizontal mode I see a thick bar and go to Settings → change the thickness. |
@Eloren1 you've been told again and again. Please stop with accusatory language. It's not welcome in this community |
And for what it's worth - I was agreeing with you. I think we may have to just accept that the user will have to flick back and fourth a couple times if they want to check what it looks like for them |
You're giving meaning to words that weren't meant to be, interrupting the discussion. It seems there's already a bias towards my words. Although it would be better not to forget the "Human First" Rule. |
Haha that's generally how it was before. But now at least 90% of the items will be available for preview in real time |
|
Do you think it is possible to add an option for decimals for book progress? I think it was a bug back in Crosspoint 0.15 and got fixed but I really grew to like it. |
|
@whyte-j Would it be possible to fix conflicts? Keen to merge this |
Happy to hear it! Will try and get it sorted this evening 🙂 As for the bar thickness @Eloren1, if we're eager to get this merged I can take a look at doing that in a follow up PR, as it won't need to use the legacy setting transformation. I got a couple of odd bugs that I haven't had the chance to squash just yet |
815b8c6 to
a708bc4
Compare
|
@osteotek all sorted! |
There was a problem hiding this comment.
Pull request overview
This PR refactors the status bar configuration system by splitting a single monolithic setting into five independent toggles: Chapter Page Count, Book Progress Percentage, Progress Bar (with three options), Chapter Title, and Battery Indicator. The changes introduce a new dedicated StatusBarSettingsActivity with a live preview feature, extract status bar rendering logic into a reusable StatusBar component, and implement backward-compatible migration for users upgrading from previous versions.
Changes:
- Extracts status bar rendering into a new StatusBar component to eliminate code duplication across reader activities
- Adds StatusBarSettingsActivity with live preview functionality and granular control over status bar elements
- Implements legacy settings migration to preserve user preferences when upgrading from the old single-setting system
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/StatusBar.h | New header defining the renderStatusBar function interface |
| src/components/StatusBar.cpp | New component implementing consolidated status bar rendering logic |
| src/components/themes/BaseTheme.h | Adds optional additionalYPadding parameter to drawReadingProgressBar |
| src/components/themes/BaseTheme.cpp | Implements the additionalYPadding parameter for preview rendering |
| src/activities/settings/StatusBarSettingsActivity.h | New activity header for status bar customization UI |
| src/activities/settings/StatusBarSettingsActivity.cpp | Implements the status bar settings UI with live preview |
| src/activities/settings/SettingsActivity.h | Adds CustomiseStatusBar action enum |
| src/activities/settings/SettingsActivity.cpp | Integrates the new StatusBarSettingsActivity into the settings menu |
| src/activities/reader/TxtReaderActivity.cpp | Refactored to use the new StatusBar component |
| src/activities/reader/EpubReaderActivity.cpp | Refactored to use the new StatusBar component |
| src/SettingsList.h | Removes the old monolithic Status Bar enum setting |
| src/CrossPointSettings.h | Adds five new status bar settings fields and marks legacy field |
| src/CrossPointSettings.cpp | Implements migration logic and persistence for new settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a708bc4 to
4ef845c
Compare
d09ff7f to
fa89ab7
Compare
fa89ab7 to
c05ca8f
Compare
ngxson
left a comment
There was a problem hiding this comment.
I haven't tested this on-device, but the code looks ok
addressed
## Summary * **What is the goal of this PR?** Update translation after #733 --- ### 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**_
## Summary This PR aims to reduce the complexity of the status bar by splitting the setting into 5: - Chapter Page Count - Book Progress % - Progress Bar - Chapter Title - Battery Indicator These are located within the new StausBarSettings activity, which also shows a preview of the bar the user has created <img width="513" height="806" alt="image" src="https://github.com/user-attachments/assets/cdf852fb-15d8-4da2-a74f-fd69294d7b05" /> <img width="483" height="797" alt="image" src="https://github.com/user-attachments/assets/66fc0c0d-ee51-4d31-b70d-e2bc043205d1" /> When updating from a previous version, the user's past settings are honoured. ## Additional Context The PR aims to remove any duplication of status bar code where possible, and extracts the status bar rendering into a new component - StatusBar It also adds a new (optional) padding option to the progress bar to allow the status bar to be shifted upwards - this is only intended for use in the settings. --- ### 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 - although did help to decode some C++ errors --------- Co-authored-by: Arthur Tazhitdinov <[email protected]>
## Summary * **What is the goal of this PR?** Update translation after crosspoint-reader#733 --- ### 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**_
* **What is the goal of this PR?** Update translation after crosspoint-reader#733 --- 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**_
This PR aims to reduce the complexity of the status bar by splitting the setting into 5: - Chapter Page Count - Book Progress % - Progress Bar - Chapter Title - Battery Indicator These are located within the new StausBarSettings activity, which also shows a preview of the bar the user has created <img width="513" height="806" alt="image" src="https://github.com/user-attachments/assets/cdf852fb-15d8-4da2-a74f-fd69294d7b05" /> <img width="483" height="797" alt="image" src="https://github.com/user-attachments/assets/66fc0c0d-ee51-4d31-b70d-e2bc043205d1" /> When updating from a previous version, the user's past settings are honoured. The PR aims to remove any duplication of status bar code where possible, and extracts the status bar rendering into a new component - StatusBar It also adds a new (optional) padding option to the progress bar to allow the status bar to be shifted upwards - this is only intended for use in the settings. --- 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 - although did help to decode some C++ errors --------- Co-authored-by: Arthur Tazhitdinov <[email protected]>



Summary
This PR aims to reduce the complexity of the status bar by splitting the setting into 5:
These are located within the new StausBarSettings activity, which also shows a preview of the bar the user has created
When updating from a previous version, the user's past settings are honoured.
Additional Context
The PR aims to remove any duplication of status bar code where possible, and extracts the status bar rendering into a new component - StatusBar
It also adds a new (optional) padding option to the progress bar to allow the status bar to be shifted upwards - this is only intended for use in the settings.
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 - although did help to decode some C++ errors