mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
ReaderProgress: insert TitleBar
This commit is contained in:
parent
77d3882eed
commit
59f04ab018
@ -1,6 +1,5 @@
|
||||
local Blitbuffer = require("ffi/blitbuffer")
|
||||
local CenterContainer = require("ui/widget/container/centercontainer")
|
||||
local CloseButton = require("ui/widget/closebutton")
|
||||
local Device = require("device")
|
||||
local Font = require("ui/font")
|
||||
local FrameContainer = require("ui/widget/container/framecontainer")
|
||||
@ -11,10 +10,10 @@ local HorizontalSpan = require("ui/widget/horizontalspan")
|
||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||
local LeftContainer = require("ui/widget/container/leftcontainer")
|
||||
local LineWidget = require("ui/widget/linewidget")
|
||||
local OverlapGroup = require("ui/widget/overlapgroup")
|
||||
local ProgressWidget = require("ui/widget/progresswidget")
|
||||
local Size = require("ui/size")
|
||||
local TextWidget = require("ui/widget/textwidget")
|
||||
local TitleBar = require("ui/widget/titlebar")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local VerticalGroup = require("ui/widget/verticalgroup")
|
||||
local VerticalSpan = require("ui/widget/verticalspan")
|
||||
@ -100,16 +99,15 @@ function ReaderProgress:getTotalStats(stats_day)
|
||||
end
|
||||
|
||||
function ReaderProgress:getStatusContent(width)
|
||||
local close_button = nil
|
||||
if self.readonly ~= true then
|
||||
close_button = CloseButton:new{ window = self }
|
||||
end
|
||||
local title_bar = TitleBar:new{
|
||||
width = width,
|
||||
bottom_v_padding = 0,
|
||||
close_callback = not self.readonly and function() self:onClose() end,
|
||||
show_parent = self,
|
||||
}
|
||||
return VerticalGroup:new{
|
||||
align = "left",
|
||||
OverlapGroup:new{
|
||||
dimen = Geom:new{ w = width, h = Size.item.height_default },
|
||||
close_button,
|
||||
},
|
||||
title_bar,
|
||||
self:genSingleHeader(_("Last week")),
|
||||
self:genSummaryWeek(width),
|
||||
self:genSingleHeader(_("Week progress")),
|
||||
|
Loading…
Reference in New Issue
Block a user