Merge branch 'koreader:master' into annotations-read-save

reviewable/pr11563/r11
hius07 1 month ago committed by GitHub
commit d2e89cb446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1 +1 @@
Subproject commit 366d9c9ca842748be76eaf948cc8719c9e51e494
Subproject commit 4a94e03da4c544e09f1557647dca086070e57cf4

@ -335,7 +335,7 @@ end
local highlight_style = {
{_("Lighten"), "lighten"},
{_("Underline"), "underscore"},
{_("Strikeout"), "strikeout"},
{_("Strikethrough"), "strikeout"},
{_("Invert"), "invert"},
}

@ -565,7 +565,7 @@ function ReaderPaging:onGotoPercent(percent)
if dest > self.number_of_pages then
dest = self.number_of_pages
end
self:onGotoPage(dest)
self:_gotoPage(dest)
return true
end
@ -575,7 +575,6 @@ function ReaderPaging:onGotoViewRel(diff)
else
self:onGotoPageRel(diff)
end
self.ui:handleEvent(Event:new("PageChangeAnimation", diff > 0))
self:setPagePosition(self:getTopPage(), self:getTopPosition())
return true
end
@ -1128,11 +1127,8 @@ function ReaderPaging:_gotoPage(number, orig_mode)
end
function ReaderPaging:onGotoPage(number, pos)
local same_page = number == self.current_page;
local animation_direction = number > self.current_page;
self:setPagePosition(number, 0)
self:_gotoPage(number)
self.ui:handleEvent(Event:new("PageChangeAnimation", animation_direction))
if pos then
local rect_p = Geom:new{ x = pos.x or 0, y = pos.y or 0 }
local rect_s = Geom:new(rect_p):copy()
@ -1142,7 +1138,7 @@ function ReaderPaging:onGotoPage(number, pos)
else
self.view:PanningUpdate(rect_s.x - self.view.visible_area.x, rect_s.y - self.view.visible_area.y)
end
elseif same_page then
elseif number == self.current_page then
-- gotoPage emits this event only if the page changes
self.ui:handleEvent(Event:new("PageUpdate", self.current_page))
end
@ -1161,14 +1157,14 @@ function ReaderPaging:onGotoRelativePage(number)
end
new_page = test_page
end
self:onGotoPage(new_page)
self:_gotoPage(new_page)
return true
end
function ReaderPaging:onGotoPercentage(percentage)
if percentage < 0 then percentage = 0 end
if percentage > 1 then percentage = 1 end
self:onGotoPage(math.floor(percentage*self.number_of_pages))
self:_gotoPage(math.floor(percentage*self.number_of_pages))
return true
end

@ -880,7 +880,7 @@ You can then paste it here with long-press in the text box.]]), true},
{ "-cr-hint: footnote;", _("Can be set on target of links (<div id='..'>) to have their link trigger as footnote popup, in case KOReader wrongly detect this target is not a footnote.")},
{ "-cr-hint: noteref;", _("Can be set on links (<a href='#..'>) to have them trigger as footnote popups, in case KOReader wrongly detect the links is not to a footnote.")},
{ "-cr-hint: noteref-ignore;", _([[
Can be set on links (<a href='#..'>) to have them NOT trigger footnote popups and in-page footnote.
Can be set on links (<a href='#..'>) to have them NOT trigger footnote popups and in-page footnotes.
If some DocFragment presents an index of names with cross references, resulting in in-page footnotes taking half of these pages, you can avoid this with:
DocFragment[id$=_16] a { -cr-hint: noteref-ignore }]])},
}},

@ -574,7 +574,7 @@ body, h1, h2, h3, h4, h5, h6, div, li, td, th { text-indent: 0 !important; }
{
id = "table_no_presentational_hints",
title = _("Ignore tables related HTML presentational hints"),
description = _("Ignore HTML attributes that contribute to styles on the <table> element and its sub-elements (ie. align, valign, frame, rules, border, cellpading, cellspacing…)."),
description = _("Ignore HTML attributes that contribute to styles on the <table> element and its sub-elements (ie. align, valign, frame, rules, border, cellpadding, cellspacing…)."),
css = [[table, caption, colgroup, col, thead, tbody, tfoot, tr, td, th { -cr-hint: no-presentational; }]],
separator = true,
},

@ -50,13 +50,13 @@ local genFallbackCandidates = function()
end
end
local more_info_text = _([[
If some book titles, dictionary entries and such are not displayed well but shown as or <EFBFBD><EFBFBD>, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.
local more_info_text = T(_([[
If some book titles, dictionary entries and such are not displayed well but shown as %1 or %2, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.
Fonts for many languages can be downloaded at:
https://fonts.google.com/noto
Only fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.]])
Only fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.]]), "￾￾", "<EFBFBD><EFBFBD>")
local getSubMenuItems = function()
genFallbackCandidates()

@ -212,7 +212,7 @@ local FileChooser = Menu:extend{
},
percent_natural = {
-- sort 90% > 50% > 0% or on hold > unopened > 100% or finished
text = _("percent - unopened - finished last"),
text = _("percent unopened finished last"),
menu_order = 90,
can_collate_mixed = false,
init_sort_func = function(cache)

Loading…
Cancel
Save