Skip to content

Feature: Dim eReader screen#215

Open
BothaGideon wants to merge 7 commits into
rodonisi:mainfrom
BothaGideon:feature/dim-screen-options
Open

Feature: Dim eReader screen#215
BothaGideon wants to merge 7 commits into
rodonisi:mainfrom
BothaGideon:feature/dim-screen-options

Conversation

@BothaGideon

Copy link
Copy Markdown
Contributor

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

Simulator Screenshot - iPhone 17 - 2026-06-18 at 10 00 47 Simulator Screenshot - iPhone 17 - 2026-06-18 at 10 01 02 Simulator Screenshot - iPhone 17 - 2026-06-18 at 10 06 00 Simulator Screenshot - iPhone 17 - 2026-06-18 at 10 06 04

BothaGideon and others added 3 commits June 17, 2026 21:37
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`.
@github-actions github-actions Bot added the feature New feature implementation label Jun 18, 2026
@rodonisi

rodonisi commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Thanks for the nicely formatted PR!
Just a question for my understanding, what would be the use-case for having it as a setting over using the device's brightness options?
Also from a UX perspective I'm also not too big of a fan of having the gesture overlapping with scrolling for vertical readers TBH, so would avoid having the vertical drag gesture for it, or have an option to disable the gesture

@BothaGideon

Copy link
Copy Markdown
Contributor Author

Thanks for the nicely formatted PR! Just a question for my understanding, what would be the use-case for having it as a setting over using the device's brightness options? Also from a UX perspective I'm also not too big of a fan of having the gesture overlapping with scrolling for vertical readers TBH, so would avoid having the vertical drag gesture for it, or have an option to disable the gesture

Thanks for the reply!

So, this is a nice-to-have :D
But, sometimes in VERY low light the lowest brightness setting is still to bright. So this makes it even easier on the eyes.

Good shout on the overlay, ill just remove that and keep it in the settings overlay page - to not clutter the interface :)

@rodonisi

Copy link
Copy Markdown
Owner

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

BothaGideon and others added 2 commits June 18, 2026 21:30
- 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>
@BothaGideon

Copy link
Copy Markdown
Contributor Author

@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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants