Don't rotate BookStatus & ReadingProgress in screensavers. (#6286)

They're full-screen, and they work fine in Landscape.

re: #5724

* Fix multiline indents in the Kindle c/p ;p
reviewable/pr6289/r1
NiLuJe 4 years ago committed by GitHub
parent 699ee3efc1
commit ff1e50c5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -235,9 +235,12 @@ function Device:onPowerEvent(ev)
logger.dbg("Suspending...")
-- Mostly always suspend in Portrait/Inverted Portrait mode...
-- ... except when we just show an InfoMessage or when the screensaver
-- is disabled, as it plays badly with Landscape mode (c.f., #4098 and #5290)
-- is disabled, as it plays badly with Landscape mode (c.f., #4098 and #5290).
-- We also exclude full-screen widgets that work fine in Landscape mode,
-- like ReadingProgress and BookStatus (c.f., #5724)
local screensaver_type = G_reader_settings:readSetting("screensaver_type")
if screensaver_type ~= "message" and screensaver_type ~= "disable" then
if screensaver_type ~= "message" and screensaver_type ~= "disable" and
screensaver_type ~= "readingprogress" and screensaver_type ~= "bookstatus" then
self.orig_rotation_mode = self.screen:getRotationMode()
-- Leave Portrait & Inverted Portrait alone, that works just fine.
if bit.band(self.orig_rotation_mode, 1) == 1 then

@ -169,9 +169,12 @@ function Kindle:intoScreenSaver()
-- NOTE: Pilefered from Device:onPowerEvent @ frontend/device/generic/device.lua
-- Mostly always suspend in Portrait/Inverted Portrait mode...
-- ... except when we just show an InfoMessage or when the screensaver
-- is disabled, as it plays badly with Landscape mode (c.f., #4098 and #5290)
-- is disabled, as it plays badly with Landscape mode (c.f., #4098 and #5290).
-- We also exclude full-screen widgets that work fine in Landscape mode,
-- like ReadingProgress and BookStatus (c.f., #5724)
local screensaver_type = G_reader_settings:readSetting("screensaver_type")
if screensaver_type ~= "message" and screensaver_type ~= "disable" then
if screensaver_type ~= "message" and screensaver_type ~= "disable" and
screensaver_type ~= "readingprogress" and screensaver_type ~= "bookstatus" then
self.orig_rotation_mode = self.screen:getRotationMode()
-- Leave Portrait & Inverted Portrait alone, that works just fine.
if bit.band(self.orig_rotation_mode, 1) == 1 then
@ -184,8 +187,8 @@ function Kindle:intoScreenSaver()
-- On eInk, if we're using a screensaver mode that shows an image,
-- flash the screen to white first, to eliminate ghosting.
if self:hasEinkScreen() and
screensaver_type == "cover" or screensaver_type == "random_image" or
screensaver_type == "image_file" then
screensaver_type == "cover" or screensaver_type == "random_image" or
screensaver_type == "image_file" then
if not G_reader_settings:isTrue("screensaver_no_background") then
self.screen:clear()
end

Loading…
Cancel
Save