add close button in InboxChooser

pull/792/head
chrox 10 years ago
parent b86a086a83
commit a21c322499

@ -230,14 +230,6 @@ local InboxChooser = InputContainer:new{
function InboxChooser:init() function InboxChooser:init()
self.show_parent = self.show_parent or self self.show_parent = self.show_parent or self
local banner = VerticalGroup:new{
TextWidget:new{
face = Font:getFace("tfont", 24),
text = _("Choose inbox"),
},
VerticalSpan:new{ width = Screen:scaleByDPI(10) }
}
local g_show_hidden = G_reader_settings:readSetting("show_hidden") local g_show_hidden = G_reader_settings:readSetting("show_hidden")
local show_hidden = g_show_hidden == nil and DSHOWHIDDENFILES or g_show_hidden local show_hidden = g_show_hidden == nil and DSHOWHIDDENFILES or g_show_hidden
local root_path = G_reader_settings:readSetting("lastdir") or lfs.currentdir() local root_path = G_reader_settings:readSetting("lastdir") or lfs.currentdir()
@ -247,11 +239,11 @@ function InboxChooser:init()
show_parent = self.show_parent, show_parent = self.show_parent,
show_hidden = show_hidden, show_hidden = show_hidden,
width = Screen:getWidth(), width = Screen:getWidth(),
height = Screen:getHeight() - banner:getSize().h, height = Screen:getHeight(),
is_popout = false, is_popout = false,
is_borderless = true, is_borderless = true,
-- FIXME: has_close_button has no effect on menu title title = _("Choose inbox"),
has_close_button = true, no_title = false,
dir_filter = function(dirname) dir_filter = function(dirname)
for _, pattern in ipairs(self.exclude_dirs) do for _, pattern in ipairs(self.exclude_dirs) do
if dirname:match(pattern) then return end if dirname:match(pattern) then return end
@ -296,10 +288,7 @@ function InboxChooser:init()
padding = 0, padding = 0,
bordersize = 0, bordersize = 0,
background = 0, background = 0,
VerticalGroup:new{ file_chooser,
banner,
file_chooser,
}
} }
end end

Loading…
Cancel
Save