mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
PathChooser: add left Home button (#8646)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
local BD = require("ui/bidi")
|
||||
local ButtonDialogTitle = require("ui/widget/buttondialogtitle")
|
||||
local FileChooser = require("ui/widget/filechooser")
|
||||
local Font = require("ui/font")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local ffiutil = require("ffi/util")
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
@@ -17,9 +16,6 @@ local PathChooser = FileChooser:extend{
|
||||
is_popout = false,
|
||||
covers_fullscreen = true, -- set it to false if you set is_popout = true
|
||||
is_borderless = true,
|
||||
-- smaller font to allow displaying our long titles
|
||||
tface = Font:getFace("smalltfont"),
|
||||
|
||||
select_directory = true, -- allow selecting directories
|
||||
select_file = true, -- allow selecting files
|
||||
show_files = true, -- show files, even if select_files=false
|
||||
@@ -45,6 +41,10 @@ function PathChooser:init()
|
||||
-- Let FileChooser display "Long-press to choose current folder"
|
||||
self.show_current_dir_for_hold = true
|
||||
end
|
||||
self.title_bar_left_icon = "home"
|
||||
self.onLeftButtonTap = function()
|
||||
self:goHome()
|
||||
end
|
||||
FileChooser.init(self)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user