Merge pull request #1888 from koreader/houqp-master

minor bookstatus fix for nexus5x
pull/1891/head
Huang Xin 8 years ago
commit b3147c7412

@ -1 +1 @@
Subproject commit 21066ecb73feec8366c7557cae901c343b67f1eb Subproject commit 8cdf526854572969436f7820eab73d99a57e9bed

@ -76,32 +76,31 @@ function BookStatusWidget:init()
enabled = true, enabled = true,
show_parent = self, show_parent = self,
} }
local screen_size = Screen:getSize()
local statusContainer = FrameContainer:new{ self[1] = FrameContainer:new{
dimen = Screen:getSize(), width = screen_size.w,
height = screen_size.h,
background = Blitbuffer.COLOR_WHITE, background = Blitbuffer.COLOR_WHITE,
bordersize = 0, bordersize = 0,
padding = 0, padding = 0,
self:showStatus(), self:getStatusContent(screen_size.w),
} }
self[1] = statusContainer
end end
function BookStatusWidget:showStatus() function BookStatusWidget:getStatusContent(width)
local screen_width = Screen:getWidth()
return VerticalGroup:new{ return VerticalGroup:new{
align = "left", align = "left",
OverlapGroup:new{ OverlapGroup:new{
dimen = Geom:new{ w = screen_width, h = Screen:scaleBySize(30) }, dimen = Geom:new{ w = width, h = Screen:scaleBySize(30) },
CloseButton:new{ window = self }, CloseButton:new{ window = self },
}, },
self:genBookInfoGroup(), self:genBookInfoGroup(),
self:genHeader(_("Statistics")), self:genHeader(_("Statistics")),
self:genStatisticsGroup(screen_width), self:genStatisticsGroup(width),
self:genHeader(_("Review")), self:genHeader(_("Review")),
self:genSummaryGroup(screen_width), self:genSummaryGroup(width),
self:genHeader(_("Update Status")), self:genHeader(_("Update Status")),
self:generateSwitchGroup(screen_width), self:generateSwitchGroup(width),
} }
end end

@ -336,7 +336,7 @@ TARGET:
exit 0 exit 0
;; ;;
android) android)
adb logcat 'luajit-launcher:D *:S' adb logcat 'luajit-launcher:D KOReader:D *:S'
;; ;;
*) *)
echo "Unsupported target: $1." echo "Unsupported target: $1."

@ -1,5 +1,6 @@
local A = require("android") local A = require("android")
A.dl.library_path = A.dl.library_path .. ":" .. A.dir .. "/libs" A.dl.library_path = A.dl.library_path .. ":" .. A.dir .. "/libs"
A.log_name = 'KOReader'
local ffi = require("ffi") local ffi = require("ffi")
ffi.cdef[[ ffi.cdef[[

Loading…
Cancel
Save