Add dim_overlap configurable

On request of users (dracodoc, kai771 et al.) I have added a new command
`O` which toggles the display (via dimmed box) of the page overlap
areas. This setting is saved on a per-book basis, i.e. is specific to
the book, which is the desired behaviour as one wants dimming on some
books (math, physics, etc) but not others (fiction).
This commit is contained in:
Tigran Aivazian
2012-10-08 12:48:01 +01:00
parent 5608759e0f
commit cd48bc4d8b
2 changed files with 19 additions and 4 deletions

View File

@@ -183,9 +183,9 @@ function CREReader:goto(pos, is_ignore_jump, pos_type)
self.doc:drawCurrentPage(self.nulldc, fb.bb)
Debug("## self.show_overlap "..self.show_overlap)
if self.show_overlap < 0 then
if self.show_overlap < 0 and self.dim_overlap then
fb.bb:dimRect(0,0, width, -self.show_overlap)
elseif self.show_overlap > 0 then
elseif self.show_overlap > 0 and self.dim_overlap then
fb.bb:dimRect(0,height - self.show_overlap, width, self.show_overlap)
end
self.show_overlap = 0