mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
5
Makefile
5
Makefile
@@ -128,8 +128,9 @@ koboupdate: all
|
||||
androidupdate: all
|
||||
mkdir -p $(ANDROID_LAUNCHER_DIR)/assets/module
|
||||
-rm $(ANDROID_LAUNCHER_DIR)/assets/module/koreader-*
|
||||
cd $(INSTALL_DIR)/koreader && 7z a -l -mx=3 \
|
||||
../../$(ANDROID_LAUNCHER_DIR)/assets/module/koreader-g$(REVISION).7z *
|
||||
cd $(INSTALL_DIR)/koreader && 7z a -l -mx=1 \
|
||||
../../$(ANDROID_LAUNCHER_DIR)/assets/module/koreader-g$(REVISION).7z * \
|
||||
-x!resources/fonts -x!resources/icons/src -x!spec
|
||||
|
||||
androiddev: androidupdate
|
||||
$(MAKE) -C $(ANDROID_LAUNCHER_DIR) dev
|
||||
|
||||
Submodule android/luajit-launcher updated: 675fce5766...3153b92693
@@ -7,6 +7,7 @@ local Geom = require("ui/geometry")
|
||||
local serial = require("serialize")
|
||||
local Cache = require("cache")
|
||||
local DEBUG = require("dbg")
|
||||
local util = require("ffi/util")
|
||||
|
||||
local KoptInterface = {
|
||||
ocrengine = "ocrengine",
|
||||
@@ -673,7 +674,20 @@ end
|
||||
|
||||
function KoptInterface:clipPagePNGString(doc, pos0, pos1, pboxes, drawer)
|
||||
local kc = self:getClipPageContext(doc, pos0, pos1, pboxes, drawer)
|
||||
local png = kc:exportSrcPNGString(pboxes, drawer)
|
||||
-- there is no fmemopen in Android so leptonica.pixWriteMemPng will
|
||||
-- fail silently, workaround is creating a PNG file and read back the string
|
||||
local png = nil
|
||||
if util.isAndroid() then
|
||||
local tmp = "cache/tmpclippng.png"
|
||||
kc:exportSrcPNGFile(pboxes, drawer, tmp)
|
||||
local pngfile = io.open(tmp, "rb")
|
||||
if pngfile then
|
||||
png = pngfile:read("*all")
|
||||
pngfile:close()
|
||||
end
|
||||
else
|
||||
png = kc:exportSrcPNGString(pboxes, drawer)
|
||||
end
|
||||
kc:free()
|
||||
return png
|
||||
end
|
||||
|
||||
@@ -21,7 +21,8 @@ function ButtonDialog:init()
|
||||
AnyKeyPressed = { { Input.group.Any },
|
||||
seqtext = "any key", doc = _("close dialog") }
|
||||
}
|
||||
else
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
self.ges_events.TapClose = {
|
||||
GestureRange:new{
|
||||
ges = "tap",
|
||||
|
||||
@@ -20,10 +20,10 @@ local VirtualKey = InputContainer:new{
|
||||
key = nil,
|
||||
icon = nil,
|
||||
label = nil,
|
||||
|
||||
|
||||
keyboard = nil,
|
||||
callback = nil,
|
||||
|
||||
|
||||
width = nil,
|
||||
height = nil,
|
||||
bordersize = 2,
|
||||
@@ -42,7 +42,7 @@ function VirtualKey:init()
|
||||
else
|
||||
self.callback = function () self.keyboard:addChar(self.key) end
|
||||
end
|
||||
|
||||
|
||||
local label_widget = nil
|
||||
if self.icon then
|
||||
label_widget = ImageWidget:new{
|
||||
@@ -96,10 +96,6 @@ end
|
||||
|
||||
function VirtualKey:invert(invert)
|
||||
self[1].invert = invert
|
||||
UIManager.update_region_func = function()
|
||||
DEBUG("update key region", self[1].dimen)
|
||||
return self[1].dimen
|
||||
end
|
||||
UIManager:setDirty(self.keyboard, "partial")
|
||||
end
|
||||
|
||||
@@ -114,7 +110,7 @@ local VirtualKeyboard = InputContainer:new{
|
||||
shiftmode = false,
|
||||
symbolmode = false,
|
||||
utf8mode = false,
|
||||
|
||||
|
||||
width = 600,
|
||||
height = 256,
|
||||
bordersize = 2,
|
||||
@@ -183,7 +179,7 @@ function VirtualKeyboard:init()
|
||||
icon = "resources/icons/appbar.arrow.enter.png",
|
||||
width = 1.5,
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
self:initLayout(self.layout)
|
||||
@@ -196,7 +192,7 @@ function VirtualKeyboard:initLayout(layout)
|
||||
end
|
||||
return 2 - boolnum(b1) + 2 * boolnum(b2) + 4 * boolnum(b3)
|
||||
end
|
||||
|
||||
|
||||
if layout then
|
||||
-- to be sure layout is selected properly
|
||||
layout = math.max(layout, self.min_layout)
|
||||
@@ -223,7 +219,7 @@ function VirtualKeyboard:addKeys()
|
||||
local horizontal_group = HorizontalGroup:new{}
|
||||
for j = 1, #self.KEYS[i] do
|
||||
local width_factor = self.KEYS[i][j].width or 1.0
|
||||
local key_width = math.floor((base_key_width + self.key_padding) * width_factor)
|
||||
local key_width = math.floor((base_key_width + self.key_padding) * width_factor)
|
||||
- self.key_padding
|
||||
local key_height = base_key_height
|
||||
local label = self.KEYS[i][j].label or self.KEYS[i][j][self.layout]
|
||||
@@ -236,7 +232,7 @@ function VirtualKeyboard:addKeys()
|
||||
height = key_height,
|
||||
}
|
||||
table.insert(horizontal_group, key)
|
||||
if j ~= #self.KEYS[i] then
|
||||
if j ~= #self.KEYS[i] then
|
||||
table.insert(horizontal_group, h_key_padding)
|
||||
end
|
||||
end
|
||||
@@ -245,7 +241,7 @@ function VirtualKeyboard:addKeys()
|
||||
table.insert(vertical_group, v_key_padding)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local size = vertical_group:getSize()
|
||||
local keyboard_frame = FrameContainer:new{
|
||||
margin = 0,
|
||||
|
||||
Submodule koreader-base updated: 34a26b30c2...3565578196
Reference in New Issue
Block a user