mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix: bug in font menu
This commit is contained in:
@@ -153,12 +153,15 @@ function FileChooser:choose(ypos, height)
|
||||
elseif ev.code == KEY_FW_DOWN then
|
||||
nextItem()
|
||||
elseif ev.code == KEY_F then -- invoke fontchooser menu
|
||||
FontChooser:init()
|
||||
fonts_menu = SelectMenu:new{
|
||||
menu_title = "Fonts Menu",
|
||||
item_array = FontChooser.fonts,
|
||||
}
|
||||
FontChooser.cfont = FontChooser.fonts[fonts_menu:choose(0, height)]
|
||||
local re = fonts_menu:choose(0, height)
|
||||
if re then
|
||||
FontChooser.cfont = FontChooser.fonts[re]
|
||||
FontChooser:init()
|
||||
end
|
||||
pagedirty = true
|
||||
elseif ev.code == KEY_S then -- invoke search input
|
||||
keywords = InputBox:input(height-100, 100, "Search:")
|
||||
@@ -169,8 +172,8 @@ function FileChooser:choose(ypos, height)
|
||||
|| to test search feature in EMU mode
|
||||
----------------------------------------------------------------
|
||||
--]]
|
||||
--FileSearcher:init("/home/dave/documents/kindle/backup/documents")
|
||||
FileSearcher:init()
|
||||
FileSearcher:init("/home/dave/documents/kindle/backup/documents")
|
||||
--FileSearcher:init()
|
||||
file = FileSearcher:choose(ypos, height, keywords)
|
||||
if file then
|
||||
return file
|
||||
|
||||
Reference in New Issue
Block a user