mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
remove trailing spaces
This commit is contained in:
@@ -130,7 +130,7 @@ function CreDocument:engineInit()
|
||||
if not engine_initilized then
|
||||
-- initialize cache
|
||||
cre.initCache(1024*1024*64)
|
||||
|
||||
|
||||
-- we need to initialize the CRE font list
|
||||
local fonts = Font:getFontList()
|
||||
for _k, _v in ipairs(fonts) do
|
||||
|
||||
@@ -47,7 +47,7 @@ end
|
||||
|
||||
ReaderConfig = InputContainer:new{
|
||||
dimen = Geom:new{
|
||||
x = 0,
|
||||
x = 0,
|
||||
y = 7*Screen:getHeight()/8,
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight()/8,
|
||||
@@ -82,7 +82,7 @@ function ReaderConfig:onShowConfigMenu()
|
||||
ui = self.ui,
|
||||
configurable = self.configurable,
|
||||
config_options = self.options,
|
||||
close_callback = function()
|
||||
close_callback = function()
|
||||
self.ui:handleEvent(Event:new("RestoreHinting"))
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ function MenuItem:init()
|
||||
local shortcut_icon_dimen = Geom:new()
|
||||
if self.shortcut then
|
||||
shortcut_icon_dimen.w = math.floor(self.dimen.h*4/5)
|
||||
shortcut_icon_dimen.h = shortcut_icon_dimen.w
|
||||
shortcut_icon_dimen.h = shortcut_icon_dimen.w
|
||||
end
|
||||
|
||||
self.detail = self.text
|
||||
@@ -132,7 +132,7 @@ function MenuItem:init()
|
||||
if Device:isTouchDevice() then
|
||||
else
|
||||
self.active_key_events.ShowItemDetail = {
|
||||
{"Right"}, doc = "show item detail"
|
||||
{"Right"}, doc = "show item detail"
|
||||
}
|
||||
end
|
||||
indicator = " >>"
|
||||
@@ -349,7 +349,7 @@ function Menu:init()
|
||||
if self.is_enable_shortcut then
|
||||
self.key_events.SelectByShortCut = { {self.item_shortcuts} }
|
||||
end
|
||||
self.key_events.Select = {
|
||||
self.key_events.Select = {
|
||||
{"Press"}, doc = "select current menu item"
|
||||
}
|
||||
end
|
||||
@@ -371,7 +371,7 @@ function Menu:updateItems(select_number)
|
||||
|
||||
for c = 1, self.perpage do
|
||||
-- calculate index in item_table
|
||||
local i = (self.page - 1) * self.perpage + c
|
||||
local i = (self.page - 1) * self.perpage + c
|
||||
if i <= #self.item_table then
|
||||
local item_shortcut = nil
|
||||
local shortcut_style = "square"
|
||||
@@ -401,7 +401,7 @@ function Menu:updateItems(select_number)
|
||||
table.insert(self.layout, {item_tmp})
|
||||
else
|
||||
-- item not enough to fill the whole page, break out of loop
|
||||
table.insert(self.item_group,
|
||||
table.insert(self.item_group,
|
||||
VerticalSpan:new{
|
||||
width = (self.item_dimen.h * (self.perpage - c + 1))
|
||||
})
|
||||
@@ -441,7 +441,7 @@ function Menu:onSelectByShortCut(_, keyevent)
|
||||
if self.item_table[(self.page-1)*self.perpage + k] then
|
||||
self:onMenuSelect(self.item_table[(self.page-1)*self.perpage + k])
|
||||
end
|
||||
break
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
@@ -471,7 +471,7 @@ override this function to process the item selected in a different manner
|
||||
]]--
|
||||
function Menu:onMenuSelect(item)
|
||||
if item.sub_item_table == nil then
|
||||
self.close_callback()
|
||||
self.close_callback()
|
||||
self:onMenuChoice(item)
|
||||
else
|
||||
-- save menu title for later resume
|
||||
|
||||
Reference in New Issue
Block a user