ReaderToc: option to show a dotted line (#7669)

A dotted line joining the ToC entry text to the
page number may make it easier to use.
(This replaces the menu item separator from d879062e.)
Also fix baselines aligment, which could be a bit off.
This commit is contained in:
poire-z authored and GitHub committed 2021-05-13 01:55:35 +02:00
1 parent a20cac6904
commit f0ecbeb1d5
4 files changed
+96 -18

No files matched your search

@@ -212,6 +212,7 @@ function ReaderPageMap:onShowPageList()
-- We use the per-page and font-size settings set for the ToC
local items_per_page = G_reader_settings:readSetting("toc_items_per_page") or 14
local items_font_size = G_reader_settings:readSetting("toc_items_font_size") or Menu.getItemFontSize(items_per_page)
local items_with_dots = G_reader_settings:nilOrTrue("toc_items_with_dots")
local pl_menu = Menu:new{
title = _("Reference page numbers list"),
@@ -225,6 +226,8 @@ function ReaderPageMap:onShowPageList()
items_font_size = items_font_size,
line_color = require("ffi/blitbuffer").COLOR_WHITE,
single_line = true,
align_baselines = true,
with_dots = items_with_dots,
on_close_ges = {
GestureRange:new{
ges = "two_finger_swipe",