fix calculation of widget height of filechooser

the height of filechooser is provided when creating filechooser
widget since there may be no title as in filemanger which needs
a special title widget to contain filemanger menu.
pull/1242/head
chrox 10 years ago
parent 50f2edcdaa
commit 0a06041cd9

@ -1,5 +1,6 @@
local PathChooser = require("ui/widget/pathchooser")
local UIManager = require("ui/uimanager")
local Screen = require("device").screen
local util = require("ffi/util")
local _ = require("gettext")
@ -20,6 +21,7 @@ function DownloadMgr:chooseDir()
local download_dir = G_reader_settings:readSetting("download_dir")
local path_chooser = PathChooser:new{
title = self.title,
height = Screen:getHeight(),
path = download_dir and (download_dir .. "/..") or lastdir,
show_hidden = G_reader_settings:readSetting("show_hidden"),
onConfirm = function(path)

@ -31,7 +31,6 @@ local FileChooser = Menu:extend{
function FileChooser:init()
self.width = Screen:getWidth()
self.height = Screen:getHeight()
-- common dir filter
self.dir_filter = function(dirname)
for _, pattern in ipairs(self.exclude_dirs) do

Loading…
Cancel
Save