-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Page overlap: add "Horizontal line" marker #10401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -211,6 +211,9 @@ function ReaderView:paintTo(bb, x, y) | |||
local center_offset = bit.rshift(self.arrow.height, 1) | |||
-- Paint at the proper y origin depending on wheter we paged forward (dim_area.y == 0) or backward | |||
self.arrow:paintTo(bb, 0, self.dim_area.y == 0 and self.dim_area.h - center_offset or self.dim_area.y - center_offset) | |||
elseif self.page_overlap_style == "line" then | |||
bb:paintRect(0, self.dim_area.y == 0 and self.dim_area.h or self.dim_area.y, | |||
self.dim_area.w, 2, Blitbuffer.COLOR_BLACK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or instead of 2, one of (or a new among them) the Size.line.medium/thick
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this "2" in highlighting drawer and marker too:
koreader/frontend/apps/reader/modules/readerview.lua
Lines 614 to 632 in 2ba694d
function ReaderView:drawHighlightRect(bb, _x, _y, rect, drawer, draw_note_mark) | |
local x, y, w, h = rect.x, rect.y, rect.w, rect.h | |
if drawer == "lighten" then | |
bb:lightenRect(x, y, w, h, self.highlight.lighten_factor) | |
elseif drawer == "underscore" then | |
bb:paintRect(x, y + h - 1, w, 2, Blitbuffer.COLOR_GRAY) | |
elseif drawer == "strikeout" then | |
local line_y = y + math.floor(h / 2) + 1 | |
if self.ui.paging then | |
line_y = line_y + 2 | |
end | |
bb:paintRect(x, line_y, w, 2, Blitbuffer.COLOR_BLACK) | |
elseif drawer == "invert" then | |
bb:invertRect(x, y, w, h) | |
end | |
if draw_note_mark then | |
if self.highlight.note_mark == "underline" then | |
bb:paintRect(x, y + h - 1, w, 2, Blitbuffer.COLOR_BLACK) | |
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That probably just means we overlooked it at the time. This does look like a Size.line.medium situation. :-)
Closes #10394.
This change is