Feature: Dim eReader screen#215
Conversation
Adds a screen dimming overlay to reduce display brightness for improved reading comfort. Users can set a persistent dim level via a new option in the reader settings. The dim level can also be adjusted dynamically by vertically dragging on the left side of the screen while in the reader, with a visual indicator showing the current percentage.
- Fix timer leak: cancel dimHideTimer on widget dispose via useEffect - Revert GestureDetector to .translucent so epub scroll gestures pass through - Move progress bar above dim overlay in stack so it stays visible when dimmed - Extract shared DimOption widget to eliminate triplication across epub/image/pdf controls - Remove redundant async/await on void onChanged callbacks - Add missing log to adjustDimLevel for consistent observability - Replace magic fontSize 12 with LayoutConstants.smallerIcon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The `readerDimSettingsProvider` returns an `AsyncValue`. Switching from `valueOrNull` to `maybeWhen` provides a more explicit and safer way to extract the `dimLevel` only when the provider is in a `data` state, falling back to a default value for `loading` or `error` states. This enhances the reliability of the dimming feature. Updates `workmanager_apple` dependency in `Podfile.lock`.
|
Thanks for the nicely formatted PR! |
Thanks for the reply! So, this is a nice-to-have :D Good shout on the overlay, ill just remove that and keep it in the settings overlay page - to not clutter the interface :) |
|
Sounds good as a first step :) I also want to iterate on the reader overlay look&feel at some point in the future and may see if there could be a way to introduce it without it becoming annoying with accidental triggers during scrolling |
- Remove vertical drag handlers from left tap zone in reader overlay - Keep dimming adjustment available through settings menu - Preserve visual dimming overlay effect when settings are changed - Clean up unused state variables (isDimming, dimHideTimer) - Remove on-screen dimming indicator that appeared during dragging Users can still control screen dimming via the DimOption widget in reader settings, but won't accidentally trigger it while navigating. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move DimOption widget to appear directly after Margins slider - Applied to both ePub reader and Image reader settings drawers - Improves logical grouping of reader customization options Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@rodonisi fixed all requests :) removed the vertical slider on the ereader - made it only an option the different Reader drawers |
- Format enum definitions with trailing newlines before semicolons. - Break long chained method calls into multiple lines for improved readability.
Small feature to make reading at night or in low light conditions a bit easier on the eyes.
It follows a similar UX to Moon+ Reader, where a reader can swipe vertically up/down on the left side of the screen to dim/brighten it
@claude helped to build and check for bugs on this feature
Uploaded dark/light mode screenshots