Slightly less crappy Nightmode (#4871)

Companion PR to https://github.com/koreader/koreader-base/pull/884
* Basically flags devices known to be stable when using PxP inversion.
* Plus, random fix for #4870 ;).
* A few FrontLight tweaks & cleanups on Kobo:
  * Moved the Kobo-specific startup status insanity to Kobo-specific init
  * Made turnOff/turnOn frontlight do a smooth ramp down/up
  * On Kobo, use turnOff/turnOn for suspend/resume, to get that smooth toggle
  * On Kobo, for NaturalLight w/ a mixer, only set warmth for setWarmth, and only set Brightness for setBrightness, otherwise, it tried to set both with not in-sync values, which made the FL widget jittery.
This commit is contained in:
NiLuJe
2019-04-08 23:05:08 +02:00
committed by GitHub
parent 8466af2c5b
commit 4005bf69aa
19 changed files with 181 additions and 122 deletions

View File

@@ -53,9 +53,9 @@ local InputText = InputContainer:new{
}
-- only use PhysicalKeyboard if the device does not have touch screen
if Device.isTouchDevice() or Device.hasDPad() then
if Device:isTouchDevice() or Device:hasDPad() then
Keyboard = require("ui/widget/virtualkeyboard")
if Device.isTouchDevice() then
if Device:isTouchDevice() then
function InputText:initEventListener()
self.ges_events = {
TapTextBox = {
@@ -150,7 +150,7 @@ if Device.isTouchDevice() or Device.hasDPad() then
end
end
if Device.hasDPad() then
if Device:hasDPad() then
if not InputText.initEventListener then
function InputText:initEventListener() end
end