Merge pull request #2087 from chrox/fix_2054

fix #2054 by removing ticks max limitation
pull/2088/head
Frans de Jonge 8 years ago committed by GitHub
commit 2f7279b659

@ -38,7 +38,6 @@ local ReaderFooter = InputContainer:new{
pageno = nil,
pages = nil,
toc_level = 0,
max_ticks = 100,
progress_percentage = 0.0,
progress_text = nil,
text_font_face = "ffont",
@ -327,9 +326,7 @@ function ReaderFooter:_updateFooterText()
local max_level = self.ui.toc:getMaxDepth()
for i = 0, -max_level, -1 do
local ticks = self.ui.toc:getTocTicks(i)
if #ticks < self.max_ticks then
table.insert(ticks_candidates, ticks)
end
table.insert(ticks_candidates, ticks)
end
-- find the finest toc ticks by sorting out the largest one
table.sort(ticks_candidates, function(a, b) return #a > #b end)

Loading…
Cancel
Save