Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep screen should respect the inverted color choice #353

Closed
randomnoise opened this issue Feb 5, 2024 · 3 comments
Closed

Sleep screen should respect the inverted color choice #353

randomnoise opened this issue Feb 5, 2024 · 3 comments

Comments

@randomnoise
Copy link
Contributor

When reading in the dark and Invert Colors enabled, if the e-reader suspends, Sleeping intermission screen uses white background and for a few seconds frontlight glares. It hurts the eyes even with the low frontlight intensity.

At least when Invert Colors is enabled, the Sleeping screen should use black blackground (similar to Powered off intermission screen).

  • Device: Aura Edition 2 Version 1
  • Version: Plato 0.9.40

Settings.toml:

[intermissions]
suspend = "logo:"
@NiLuJe
Copy link
Contributor

NiLuJe commented Feb 5, 2024

Likely the flash. Can't really be helped on devices without proper Eclipse waveform modes (i.e,, Mk 8+). (I mean, if you want to keep the flash, that is :D. And you generally do.).

(IIRC, there's a Plato fork that attempts to modulate the frontlight level during nightmode refreshes, but that's extremely difficult to achieve in a consistent manner across a wide range of devices in my experience (outside of doing in in-kernel), so, YMMV).

@randomnoise
Copy link
Contributor Author

@NiLuJe, thanks for the information. Flash contributes to the situation and I don't want to deal with the kernel space on e-readers yet, I am new to this stuff 😄

The issue that I am having is related to the Plato though, it isn't about hardware or kernel. I opened the issue as a feature request but I think that it is a Plato bug.

I've skimmed through the code and I found this:

fn render(&self, fb: &mut dyn Framebuffer, _rect: Rectangle, fonts: &mut Fonts) {
let scheme = if self.halt ^ fb.inverted() {
TEXT_INVERTED_HARD
} else {
TEXT_NORMAL
};

It looks like the code handles what I was asking (using black background in sleep screen if color is inverted) but there are if fb.inverted() { code blocks following that. So, I think the code undoes the change it did in the first place.

I think it should just be

let scheme = TEXT_NORMAL;

or something similar.

@randomnoise
Copy link
Contributor Author

To make the my suggestion clear visually, in stock Plato 0.9.40, Home screen with inverted color and Sleeping screen with white background:

03-inverted-main-menu 04-inverted-sleeping

@randomnoise randomnoise changed the title [Feature Request] Sleep screen should respect the inverted color choice Sleep screen should respect the inverted color choice Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants