mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
Merge pull request #453 from chrox/master
add missing registry for fb2 document
This commit is contained in:
commit
48bf9637f2
@ -88,8 +88,8 @@ DCREREADER_CONFIG_DEFAULT_FONT_SIZE = 22 -- default font size
|
|||||||
-- crereader margin sizes
|
-- crereader margin sizes
|
||||||
-- margin {left, top, right, bottom} in pixels
|
-- margin {left, top, right, bottom} in pixels
|
||||||
DCREREADER_CONFIG_MARGIN_SIZES_SMALL = {5, 10, 5, 10}
|
DCREREADER_CONFIG_MARGIN_SIZES_SMALL = {5, 10, 5, 10}
|
||||||
DCREREADER_CONFIG_MARGIN_SIZES_MEDIUM = {20, 15, 20, 15}
|
DCREREADER_CONFIG_MARGIN_SIZES_MEDIUM = {10, 15, 10, 15}
|
||||||
DCREREADER_CONFIG_MARGIN_SIZES_LARGE = {25, 20, 25, 20}
|
DCREREADER_CONFIG_MARGIN_SIZES_LARGE = {20, 20, 20, 20}
|
||||||
|
|
||||||
-- gesture detector defaults
|
-- gesture detector defaults
|
||||||
DGESDETECT_DISABLE_DOUBLE_TAP = true
|
DGESDETECT_DISABLE_DOUBLE_TAP = true
|
||||||
|
@ -324,6 +324,7 @@ end
|
|||||||
function CreDocument:register(registry)
|
function CreDocument:register(registry)
|
||||||
registry:addProvider("txt", "application/txt", self)
|
registry:addProvider("txt", "application/txt", self)
|
||||||
registry:addProvider("epub", "application/epub", self)
|
registry:addProvider("epub", "application/epub", self)
|
||||||
|
registry:addProvider("fb2", "application/fb2", self)
|
||||||
registry:addProvider("html", "application/html", self)
|
registry:addProvider("html", "application/html", self)
|
||||||
registry:addProvider("htm", "application/htm", self)
|
registry:addProvider("htm", "application/htm", self)
|
||||||
registry:addProvider("zip", "application/zip", self)
|
registry:addProvider("zip", "application/zip", self)
|
||||||
|
@ -53,10 +53,14 @@ function ReaderLink:onTap(arg, ges)
|
|||||||
local pos = self.view:screenToPageTransform(ges.pos)
|
local pos = self.view:screenToPageTransform(ges.pos)
|
||||||
for i = 1, #self.view.links do
|
for i = 1, #self.view.links do
|
||||||
local link = self.view.links[i]
|
local link = self.view.links[i]
|
||||||
|
-- enlarge tappable link box
|
||||||
local lbox = Geom:new{
|
local lbox = Geom:new{
|
||||||
x = link.start_x, y = link.start_y,
|
x = link.start_x - Screen:scaleByDPI(15),
|
||||||
w = link.end_x - link.start_x,
|
y = link.start_y - Screen:scaleByDPI(15),
|
||||||
h = link.end_y - link.start_y > 0 and link.end_y - link.start_y or 30,
|
w = link.end_x - link.start_x + Screen:scaleByDPI(30),
|
||||||
|
h = link.end_y - link.start_y > 0
|
||||||
|
and link.end_y - link.start_y + Screen:scaleByDPI(30)
|
||||||
|
or Screen:scaleByDPI(50),
|
||||||
}
|
}
|
||||||
if inside_box(pos, lbox) then
|
if inside_box(pos, lbox) then
|
||||||
DEBUG("goto link", link)
|
DEBUG("goto link", link)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||||
|
local Device = require("ui/device")
|
||||||
local Screen = require("ui/screen")
|
local Screen = require("ui/screen")
|
||||||
local GestureRange = require("ui/gesturerange")
|
local GestureRange = require("ui/gesturerange")
|
||||||
local UIManager = require("ui/uimanager")
|
local UIManager = require("ui/uimanager")
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d73713f8b88acf02c6eb6057363e7a42586862a5
|
Subproject commit 6284768bc3e317385164e9955837ac75265ffd1d
|
Loading…
Reference in New Issue
Block a user