Skip to content

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

Merged
merged 3 commits into from
May 7, 2023
Merged

Conversation

hius07
Copy link
Member

@hius07 hius07 commented May 7, 2023

01

02

03

Closes #10394.


This change is Reviewable

@@ -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)
Copy link
Contributor

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 ?

Copy link
Member Author

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:

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

Copy link
Member

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. :-)

@Frenzie Frenzie added this to the 2023.05 milestone May 7, 2023
@hius07 hius07 merged commit b4f453e into koreader:master May 7, 2023
@hius07 hius07 deleted the overlap-line branch May 7, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page overlap indicator visibility
3 participants