calin-darie / gentle-glow-onyx-boox

Frontlight control for Onyx Boox e-readers
MIT License
53 stars 1 forks source link

Add On/Off button #9

Closed mergen3107 closed 2 years ago

mergen3107 commented 3 years ago

Hi!

Thank you very much for this great app! I use it with Button Mapper, having Gentle Glow open upon long-press of the physical Back button on my Onyx Boox Kon-Tiki 2 (it has the same platform as Nova 3).

Can you please add the lights On/Off button into the dialog itself? Currently I can only switch the lights on/off via Notifications Quick Settings for Gentle Glow, or with Onyx stock window, which requires additional steps.

Thank you!

calin-darie commented 3 years ago

Hi! Thanks for the suggestion! I'll surely find a way to enable turning off the light from the dialog. I was about to suggest that you create an "off" setting, with 0 brightness. But as I was testing that, I noticed it's broken: if you select the "off" setting and close the dialog, then when you open the dialog again the light is turned on to a different setting than before, which is kinda annoying.

mergen3107 commented 3 years ago

Thank you!

Yes, I tried this one and wondered why it doesn't stick

calin-darie commented 2 years ago

I will add a toggle button in the top right corner. This is consistent with other features accessible from the quick settings, e.g. wifi and bluetooth. Whenever you open the dialog, the toggle will be automatically turned on. When you turn the toggle off, the setting radiobuttons and brightness&warmth sliders will be invisible.

A second step will disable brightness-0 settings, and replace them with the default presets for people who had set them before. If we were to have off profiles, the whole warmth slider is useless, the lights on at dialog open rule would conflict with the restore the latest setting rule.

calin-darie commented 2 years ago

I keep the "ensure light on on dialog open" rule because when you come to Gentle Glow with your light off you most likely wanted to turn it on. And if it's dark then it's a life saver. In the unlikely case that you had other plans, you can simply hit the light switch and then exit the dialog.

The dialog remains open when the light is switched off, just in case you accidentally turned the light off or wanted to compare between the current profile and light off. The dialog keeps its size, so that the light switch remains under your thumb which is most valuable if you accidentally do it in the dark.

The table will be made scrollable in case the new top bar doesn't prevent 6" screen Poke users from seeing all the settings in landscape mode.

calin-darie commented 2 years ago

@mergen3107 v3.0 is out with a slightly new layout, to accomodate the on/off button. You can no longer set the brightness to 0 from the slider or decrease button.

Can you please let me know if it all works fine for you?

mergen3107 commented 2 years ago

@calin-darie Thank you! I’ll test it in a while once I have more time