mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix night mode setting
implement bezel cleaning with proper background color
This commit is contained in:
@@ -160,6 +160,15 @@ function Screen:setScreenMode(mode)
|
||||
end
|
||||
end
|
||||
|
||||
function Screen:toggleNightMode()
|
||||
self.bb:invert()
|
||||
if self.viewport then
|
||||
-- invert and blank out the full framebuffer when we are working on a viewport
|
||||
self.fb.bb:invert()
|
||||
self.fb.bb:fill(Blitbuffer.COLOR_WHITE)
|
||||
end
|
||||
end
|
||||
|
||||
function Screen:saveCurrentBB()
|
||||
if self.saved_bb then self.saved_bb:free() end
|
||||
self.saved_bb = self.bb:copy()
|
||||
|
||||
Reference in New Issue
Block a user